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

Fix RGB to HSV converter #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Remiii
Copy link

@Remiii Remiii commented Nov 8, 2015

Fix RGB to HSV converter.

Round saturation and value is a mistake because value is between 0 to 1 and the numbers after the comma are important.

Error exemple with pink color:

Color pink => #FFC0CB => R: 255, G: 203, B: 192 => H: 350°, S: 0, V: 1

=> Saturation is set to 0 due to the Math.round... the good value is 0,25 for 25% of saturation.

And the good result must be:

Color pink => #FFC0CB => R: 255, G: 203, B: 192 => H: 350°, S: 0.25, V: 1

@Remiii
Copy link
Author

Remiii commented Jan 2, 2016

Do you have the same issue? Could you give me a feeback?

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

Successfully merging this pull request may close these issues.

None yet

1 participant