Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow returning hex encoded as an integer #10

Open
Richienb opened this issue Aug 5, 2020 · 1 comment
Open

Allow returning hex encoded as an integer #10

Richienb opened this issue Aug 5, 2020 · 1 comment

Comments

@Richienb
Copy link
Contributor

Richienb commented Aug 5, 2020

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

@sindresorhus
Copy link
Owner

You can do Number.parseInt(rgbHex(65, 131, 196), 16). Not sure the use-case is common enough to add a new option for this. If it is, it should be a new method instead, to keep the types simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants