Closed Thread Icon

Preserved Topic: Converting RGB, HSL, HSB (link) Pages that link to <a href="https://ozoneasylum.com/backlink?for=19823" title="Pages that link to Preserved Topic: Converting RGB, HSL, HSB (link)" rel="nofollow" >Preserved Topic: Converting RGB, HSL, HSB (link)\

 
Author Thread
warjournal
Maniac (V) Mad Scientist

From:
Insane since: Aug 2000

posted posted 04-21-2003 21:23

The last time I posted a link about colour models, there was lots of info about the different colour models. However, it was a bit short on converting between the models. There were a few links, but nothing terribly versatile.

Recently, I almost got into a rant over at GN. I did vent a little bit, but not a full-blown rant. Kinda goes back to my problems with Adobe with regards to RGB, HSB, and HSL.

I don't know what happened this time, but I hit paydirt. I don't know what happened. Maybe this page wasn't up way back when I was doing my research. Maybe I hit the right word combo with Google.

This link gives the formulas/algorithms for converting RGB<>HSB and RGB<>HSL.

http://www.paris-pc-gis.com/MI_Enviro/Colors/color_models.htm

Might be useful info for some of you coders, like Zox. Even if you don't code, unlike Zox, it's still something you might want to tuck away for future reference.

edit: There is a difference between "RGB" and "R,G,B". I've known about this, but I am guilty of using "RGB" to mean "R,G,B".



[This message has been edited by warjournal (edited 04-21-2003).]

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 04-22-2003 14:41

Woohoo! Thanks man, I'be actually been looking for something like this for a long time.

warjournal
Maniac (V) Mad Scientist

From:
Insane since: Aug 2000

posted posted 04-22-2003 22:23

No prob, Drac. If you do something cool or useful with the info, let us know.

Maybe Steve will get away from Flash long enough to mess around with Filter Meister (thanks, jstuartj) and do something cool with the info. edit: Damn, Win only. Too bad for Steve.

I am a bit concerned about this bit at the top of the page:

quote:
...I may have introduced some errors...


Pretty vague, but it might apply to the algorithms.
I'll do some more poking around and see if I can verify them.


[This message has been edited by warjournal (edited 04-22-2003).]

[This message has been edited by warjournal (edited 04-22-2003).]

docilebob
Maniac (V) Mad Scientist

From: buttcrack of the midwest
Insane since: Oct 2000

posted posted 04-23-2003 05:05

Good stuff, Mr Journal.
Can`t say that I understand all of it yet, but thanks.

warjournal
Maniac (V) Mad Scientist

From:
Insane since: Aug 2000

posted posted 04-24-2003 07:14

Ran across yet another anomoly.

Okay, I can understand people confusing HSL and HSB. I don't like it, but I'm learning to live with it. I found a little something that adds to the confusion.

Turns out "classic" HSL has difference ranges than HSB.

HSL:
Hue 0-240
Sat 0-240
Lum 0-240

HSB:
Hue 0° - 360°
Sat 0% - 100%
Lum 0% - 100%

In particular, notice Hue in both models. Since both models are similiar, Hue in HSL is commonly given 0 - 360. I know things such as this can be scaled and all that, but it doesn't really help those of us getting into the nitty gritty technical side of things. All it does is add to the meme that HSL and HSB are the same. I'm turning into a grumpy ol' cuss that is about to wage war... yet again.

I also dug up this little nugget:

quote:
HSL's fascination with gray stems from its origins in the television industry. Luminance is the black-and-white portion of a television signal. The inventors of color television modified the black-and-white television signal, adding hue and saturation data in such a way that monochrome sets would ignore them.


-Chapter 4 - Colour

I'm getting too old for this shit.
I'm going to bed.

edit: I'm an idiot.


[This message has been edited by warjournal (edited 04-24-2003).]

docilebob
Maniac (V) Mad Scientist

From: buttcrack of the midwest
Insane since: Oct 2000

posted posted 04-24-2003 20:19

And there ya have it .


jstuartj
Bipolar (III) Inmate

From: Mpls, MN
Insane since: Dec 2000

posted posted 04-29-2003 20:37

I was doing some research and came across this link, and though it might be of intrest.

http://www.easyrgb.com/math.html

J. Stuart J.



Big Cloud
Bipolar (III) Inmate

From: a little too close to NYC
Insane since: Oct 2002

posted posted 04-29-2003 22:12

I've always pronounced it "aRGiBa"

Thanks WarJ... I've been looking for something like this for a while.

« BackwardsOnwards »

Show Forum Drop Down Menu