GitShow/sindresorhus/rgb-hex
sindresorhus

rgb-hex

Convert RGB color to HEX

by sindresorhus
Star on GitHubForknpm

JavaScript

121 stars20 forks5 contributorsQuiet · 2y agoSince 2014v4.1.0MIT

Meet the team

See all 5 on GitHub →
sindresorhus
sindresorhus19 contributions
Mottie
Mottie2 contributions
BendingBender
BendingBender1 contribution
Richienb
Richienb1 contribution
STLighter
STLighter1 contribution

Languages

View on GitHub →
JavaScript92.6%
TypeScript7.4%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
Richienb
Allow returning hex encoded as an integerClosedIssue

It would be useful if there was an option that returned the hex as an integer. Such integers are the only type of number accepted by most image manipulation libraries such as omggif and jimp. // @sindresorhus

Richienb · 5mo ago
Richienb
Allow specifying alpha as a number from 0 to 255ClosedIssue

Currently, the alpha can only be specified as a decimal or percentage. However, it would be useful if it could be specified as a number from 0 to 255. Conversion back to percentages is: cc @sindresorhus

Richienb · 5mo ago
jfstephe
rgb values as percentages aren't converted correctlyClosedIssue

rgbHex("rgb(100%, 50%, 0%)") should in theory return "FF8000" but it returns "643200" (this isn't a major problem for me ATM but just an FYI)

jfstephe · 2y ago
Structured data for AI agents

Repository: sindresorhus/rgb-hex. Description: Convert RGB color to HEX Stars: 121, Forks: 20. Primary language: JavaScript. Languages: JavaScript (92.6%), TypeScript (7.4%). License: MIT. Latest release: v4.1.0 (2y ago). Open PRs: 0, open issues: 0. Last activity: 2y ago. Community health: 85%. Top contributors: sindresorhus, Mottie, BendingBender, Richienb, STLighter.

·@ofershap

Replace github.com with gitshow.dev