Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #3878
| From | Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: RGB vs HSV |
| Followup-To | comp.lang.java.programmer |
| Date | 2011-05-10 10:16 +1200 |
| Organization | Geek Central |
| Message-ID | <iq9p4d$7ur$1@lust.ihug.co.nz> (permalink) |
| References | <iq7ho7$sv1$1@lust.ihug.co.nz> <iq7q5d$b2u$1@dont-email.me> |
Followups directed to: comp.lang.java.programmer
In message <iq7q5d$b2u$1@dont-email.me>, wrote: > On 5/8/2011 6:58 PM, Lawrence D'Oliveiro wrote: > >> Wikipedia has formulas for the conversion. Or you can use code like the >> HSVA class here >> <https://github.com/ldo/ti5x_android/blob/master/src/GraphicsUseful.java>. > > > I found this, the algorithm seems a bit more compact than yours. Might > want to give it a look: > > <http://cs.haifa.ac.il/hagit/courses/ist/Lectures/Demos/ColorApplet2/t_convert.html> In what way more compact? The RGB-to-HSV seems to involve just as many comparisons (not counting the special case, where they return an out-of- ange value, while I don’t), and the hue calculation is written out three times, instead of just once. HSV-to-RGB seems to be no more simple than my version.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
RGB vs HSV Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-05-09 13:58 +1200
Re: RGB vs HSV markspace <-@.> - 2011-05-08 21:22 -0700
Re: RGB vs HSV Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-05-10 10:16 +1200
Re: RGB vs HSV "Gavino" <invalid@invalid.invalid> - 2011-05-10 20:18 +0200
Re: RGB vs HSV Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-05-11 13:59 +1200
Re: RGB vs HSV "John B. Matthews" <nospam@nospam.invalid> - 2011-05-11 00:59 -0400
Re: RGB vs HSV Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-05-11 17:25 +1200
csiph-web