{"id":21924269,"url":"https://github.com/brandonhimpfen/is-hex-color-code","last_synced_at":"2026-05-01T00:31:34.063Z","repository":{"id":182937935,"uuid":"656411253","full_name":"brandonhimpfen/is-hex-color-code","owner":"brandonhimpfen","description":"A simple npm package to validate hexadecimal color codes.","archived":false,"fork":false,"pushed_at":"2023-06-20T23:09:51.000Z","size":3,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-03T00:57:00.368Z","etag":null,"topics":["code","color","colour","hex","hex-code","hex-codes","hex-color","hex-colors","hexidecimal"],"latest_commit_sha":null,"homepage":"https://www.himpfen.com/is-hex-color-code/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brandonhimpfen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-06-20T22:52:22.000Z","updated_at":"2025-07-22T15:33:40.000Z","dependencies_parsed_at":"2023-07-22T07:21:13.656Z","dependency_job_id":null,"html_url":"https://github.com/brandonhimpfen/is-hex-color-code","commit_stats":null,"previous_names":["brandonhimpfen/is-hex-color-code"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brandonhimpfen/is-hex-color-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonhimpfen%2Fis-hex-color-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonhimpfen%2Fis-hex-color-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonhimpfen%2Fis-hex-color-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonhimpfen%2Fis-hex-color-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brandonhimpfen","download_url":"https://codeload.github.com/brandonhimpfen/is-hex-color-code/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandonhimpfen%2Fis-hex-color-code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32481553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code","color","colour","hex","hex-code","hex-codes","hex-color","hex-colors","hexidecimal"],"created_at":"2024-11-28T21:14:16.713Z","updated_at":"2026-05-01T00:31:34.039Z","avatar_url":"https://github.com/brandonhimpfen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# is-hex-color-code\n\n[![npm version](https://img.shields.io/npm/v/is-hex-color-code.svg)](https://www.npmjs.com/package/is-hex-color-code)\n\nA simple npm package to validate hexadecimal color codes.\n\n## Installation\n\nYou can install the package using npm:\n\n```\nnpm install is-hex-color-code\n```\n\n## Usage\n\nImport the `isHex` function into your project and use it to check if a value is a valid hexadecimal color code.\n\n```\nconst isHex = require('is-hex-color-code');\n\nconsole.log(isHex('#FFFFFF'));  // Output: true\nconsole.log(isHex('#123abc'));  // Output: true\nconsole.log(isHex('invalid'));  // Output: false\nconsole.log(isHex('#HHJJZZ'));  // Output: false\nconsole.log(isHex('#ACBD'));  // Output: false\n```\n\nThe `isHex` function accepts a color value as input and returns `true` if it is a valid hexadecimal color code (with or without the `#` prefix), and `false` otherwise.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandonhimpfen%2Fis-hex-color-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrandonhimpfen%2Fis-hex-color-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandonhimpfen%2Fis-hex-color-code/lists"}