Array color methods provide inconsistent results #1119

Closed
TriteLife opened this Issue Apr 12, 2012 · 2 comments

Comments

Projects
None yet
2 participants

The array methods .rgbToHsb() and .hsbToRgb() sometimes will not yield expected results.

Take this example:

[20,76,29].hsbToRgb().rgbToHsb()
// [19, 76, 29]

Ideally that would return the same value it started as.

Running through all possibilities of HSB will have around 1.4 million inconsistent results. I understand the limitations of converting these using only ints. I just feel that consistency would be the more expected result.

Although it's entirely possible I'm not fully thinking through the limitations to their full extent.

Member

SergioCrisostomo commented Apr 12, 2014

@TriteLife, I'm reviewing the issues queue preparing for the 1.5 release later this month.
This issue seems to have been fixed. Can you confirm that in this fiddle: http://jsfiddle.net/WBBhf/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment