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

Getting different color in both platform #24

Closed
shrivastavaanurag opened this issue May 12, 2021 · 1 comment
Closed

Getting different color in both platform #24

shrivastavaanurag opened this issue May 12, 2021 · 1 comment

Comments

@shrivastavaanurag
Copy link

Hi, thanks for this awesome library, I am using this in one of my react native projects. But my client wants me to get the same exact color for IOS and Android as well, but this library gives different color for the same image. what should I do?

@osamaqarem
Copy link
Owner

This library is a wrapper around the Palette class on Android and UIImageColors on iOS. So because they have different implementation, they can extract different colors for the same image.

There isn't anything you can do. you could tinker with the colors extracted for some image and see which properties are closest to each other in iOS and Android.

you can check if node-vibrant works with react native since its implemented in JS and will get the same colors for both platforms.

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