Hi,
Is there a built in function that converts an RGB color to HSL(Hue,Saturation,Light) and vice-versa?
I need to brighten a given RGB color without loosing the color information. Simply multiplying the color by 1.5 or 2.0 wont work for me because if one of the RGB channels is over 255, the color value will become unbalanced.
RGB color to HSL
-
- Halfling
- Posts: 91
- Joined: Mon Jan 07, 2013 4:24 am
- x 13
RGB color to HSL
Ludoria now on Kickstarter! Ludoria is now on KickStarter! https://www.kickstarter.com/projects/17 ... g-rpg-game
Ludoria's official website http://www.Ludoria.com
On Facebook https://www.facebook.com/pages/Ludoria/644733108967479
On Twitter https://twitter.com/LudoriaGame
Ludoria's official website http://www.Ludoria.com
On Facebook https://www.facebook.com/pages/Ludoria/644733108967479
On Twitter https://twitter.com/LudoriaGame
- c6burns
- Beholder
- Posts: 1512
- Joined: Fri Feb 22, 2013 4:44 am
- Location: Deep behind enemy lines
- x 138
Re: RGB color to HSL
Just looking at the API quickly there is a set/getHSB:
http://www.ogre3d.org/docs/api/1.9/clas ... 403482eaae
http://www.ogre3d.org/docs/api/1.9/clas ... 403482eaae
-
- Halfling
- Posts: 91
- Joined: Mon Jan 07, 2013 4:24 am
- x 13
Re: RGB color to HSL
Omg thanks lol. I don't know how I missed that. Google failed me this time.c6burns wrote:Just looking at the API quickly there is a set/getHSB:
http://www.ogre3d.org/docs/api/1.9/clas ... 403482eaae
Ludoria now on Kickstarter! Ludoria is now on KickStarter! https://www.kickstarter.com/projects/17 ... g-rpg-game
Ludoria's official website http://www.Ludoria.com
On Facebook https://www.facebook.com/pages/Ludoria/644733108967479
On Twitter https://twitter.com/LudoriaGame
Ludoria's official website http://www.Ludoria.com
On Facebook https://www.facebook.com/pages/Ludoria/644733108967479
On Twitter https://twitter.com/LudoriaGame
- c6burns
- Beholder
- Posts: 1512
- Joined: Fri Feb 22, 2013 4:44 am
- Location: Deep behind enemy lines
- x 138
Re: RGB color to HSL
It happens! Your last question about colour had a simple answer I overlooked by not going straight to the API, so I went there first this time