Color.colorToHSV bug

by Keith Wiley » Wed, 01 Apr 2009 07:44:45 GMT

Sponsored Links
 I believe there is a bug in Android's implementation of
Color.colorToHSV().  If you pass it fully desaturated color, it
assigns all three HSV components to the same value, that value being
the "value" component of the color.  While hue is arguably arbitrary
in such an instance could be assigned any value at random, saturation
should unambiguously be assigned zero in such a least,
that's how I see it.  I have circumvented this bug in my code by
testing the individual bytes of the input color against each other to
detect desaturation, and when it occurs, explicitly overwriting the
resulting HSV color's saturation component with zero, but this bug,
assuming I'm interpreting it correctly as a bug, should be fixed.

BTW, is there an official channel to file such a bug report?  I don't
see anything jumping out at me when I explore,
but maybe I missed it.


Color.colorToHSV bug

by thesquib » Wed, 01 Apr 2009 09:03:41 GMT

 Bugs and issues can be added and tracked at 


Sponsored Links

Other Threads

1. Transparent background issue with image in 2.2, not 2.3


For my current project I'm having an issue with images that I have
never seen before on Android.

I have an image (link at bottom) that I use in my application and as
you can see in the screenshot (screenshot of HTC Hero, running 2.2, at
the bottom) and the background is a little gray while the png has a
transparent background... However when testing this on my N1 device,
running 2.3, the background is transparant (screenshot of N1 at the
bottom), as should be...

Does anyone has an idea what causes the issue, I also have the issue
on a 2.2 emulator, not on the 2.3 emulator, and how I could solve it?

My image:
HTC Hero screenshot:
N1 screenshot:




2. Anggota baru

Hallo saya anggota baru...di racunin suami pake android...trus ikutan gabung
deh di grup ini...
Mohon pencerahan dan bimbingan Master, suhu-suhu semuaaa....


Noganz Droid Fam


3. how can i use an API from full debug build

4. (WTA) Please Help DHD ngga bs start up

5. Cara Mengaktifkan EVDO di Galaxy Tab CDMA Sprint

6. Hacker taklukkan bb torch dan iphone 4

7. Defy problem