Convert RGB to HSV

Richmond Mathewson richmondmathewson at gmail.com
Sun Jul 5 15:33:36 EDT 2009


The Wikipedia article I referenced in an earlier posting in this thread
is really quite comprehensive, including 3-d diagrams of how this
is conceptualised.

I generally find the algorithms on Wikipedia are very useful in
this sort of case, as, am not going to get out my slide-rule and
work out the whole jingbang for myself - this life being too short.

Frankly, as a simple type of chap, who only prints out coloured
stuff rarely, I am perfectly happy with RGB.

I just got piqued when somebody esle was writing about HSV (err, HSB ???)
and so on, and thought "I wonder if I can do that?" as, honestly, had a very
unstimulating few days (went to a funeral, helped in Bulgaria's 
parliamentary
elections . . . need I say more) and felt a need to stretch the mind a spot.

Learned about:

statRound  (have you ever come across that one before?)
mouseColor
 
so can't all have been bad.   :)

Randall Reetz wrote:
> Oh, i get it.  Min and max allows the range as Hue is relative to this range between min and max RGB values and their average within the full range determines S and thus V.
>
> -----Original Message-----
> From: "Randall Reetz" <randall at randallreetz.com>
> To: "How to use Revolution" <use-revolution at lists.runrev.com>
> Sent: 7/5/2009 10:44 AM
> Subject: RE: Convert RGB to HSV
>
> Just thinking... but by light mixing physics it would seem that Hue would simply be some three-matrix sum, S would be the sum of R,G, and B devided by the range for any one of them, and V just that total range minus S.   Is all of this "min" and "max" just some sort of maths shortcut?  Maybe this is a way of figuring the range between R,G, and B?  Seems unintuitive as it obfuscates the real relationships involved.  What am i missing?
>
> -----Original Message-----
> From: "Richmond Mathewson" <richmondmathewson at gmail.com>
> To: "How to use Revolution" <use-revolution at lists.runrev.com>
> Sent: 7/5/2009 8:45 AM
> Subject: Re: Convert RGB to HSV
>
> Well, well, well . . . digging around in the Documentation I discovered
>
> statRound (having fallen foul of 'round');
>
> http://mathewson.110mb.com/FILEZ/COLORNAMER.rev.zip
>
> still feeling a bit 'funny' about those negative S values . . .
>   
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>   




More information about the use-livecode mailing list