{"id":15833098,"url":"https://github.com/davealdon/hext","last_synced_at":"2025-10-30T02:53:50.966Z","repository":{"id":57106277,"uuid":"460263284","full_name":"DaveAldon/hext","owner":"DaveAldon","description":"🌈  Get hex colors with transparency based on opacity percentage","archived":false,"fork":false,"pushed_at":"2022-02-17T17:35:13.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T04:07:05.296Z","etag":null,"topics":["code","color","colors","hex","rgb","transparency"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@davealdon/hext","language":"TypeScript","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/DaveAldon.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}},"created_at":"2022-02-17T03:10:15.000Z","updated_at":"2022-02-17T17:58:27.000Z","dependencies_parsed_at":"2022-08-20T23:50:11.310Z","dependency_job_id":null,"html_url":"https://github.com/DaveAldon/hext","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveAldon%2Fhext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveAldon%2Fhext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveAldon%2Fhext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveAldon%2Fhext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DaveAldon","download_url":"https://codeload.github.com/DaveAldon/hext/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246635987,"owners_count":20809333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","colors","hex","rgb","transparency"],"created_at":"2024-10-05T13:01:19.983Z","updated_at":"2025-10-30T02:53:50.882Z","avatar_url":"https://github.com/DaveAldon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hext\n[![NPM Version](https://img.shields.io/npm/v/@davealdon/hext.svg)](https://www.npmjs.com/package/@davealdon/hext)\n![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)\n![Jest](https://img.shields.io/badge/-jest-%23C21325?style=for-the-badge\u0026logo=jest\u0026logoColor=white)\n\nGet hex colors with transparency based on opacity percentage. *Wow!* **No more rgb mixed with hex!**\n\n### Install\n`npm install @davealdon/hext`\nor\n`yarn add @davealdon/hext`\n\nThen pass your hex color (string), and the percentage (number):\n```ts\nimport { hext } from '@davealdon/hext';\n\nconst hexColor = hext('#ff0000', 30);\n\nconsole.log(hexColor); // #ff00004D\n```\n\nThis will output the color with the transparency code tacked onto the end. It's pretty simple!\n\n### Additional API usage\n\nThere's are a couple more functions available to you that hext uses to output the whole color code:\n\n| function      | usage | description |\n| ----------- | ----------- | ----------- |\n| hext | `hext('#ff0000', 30) // #ff00004D` | Returns entire hex code with transparency |\n| transparencyToHex      | `transparencyToHex(30) // 4D` | Returns only the transparency code. Does not include hash |\n| convertToSixDigitHex   | `convertToSixDigitHex(\"ff0\") // ffff00` | Converts a shorthand hex code and returns the full 6 character code. Does not include hash |\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavealdon%2Fhext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavealdon%2Fhext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavealdon%2Fhext/lists"}