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

How to call the util function rgbToHex? Or How to get pallete in Hex format? #125

Open
guloic opened this issue May 26, 2021 · 1 comment

Comments

@guloic
Copy link

guloic commented May 26, 2021

The Readme mentions rgbToHex but the code does not export that function in the util.ts. Any idea how that can be used?

If getPallete or getSwatches can return hex directly along with population count, that would be great.

@chuckdries
Copy link

It's on the swatch object. For example, with getPallete, you might call

const vibrantData = await Vibrant.from(filePath)
  .quality(1)
  .getPalette();

const vibrantHex = vibrantData.Vibrant.getHex()

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