Pixelation

General => General Discussion => Topic started by: ErekT on August 19, 2015, 06:37:01 pm

Title: Making a color calibration tool...
Post by: ErekT on August 19, 2015, 06:37:01 pm
Hey everybody!

I'm trying to make a color saturation setup for my game where you adjust a saturation slider. The idea is that when saturation is where it needs to be you'll be able to distinguish between two colors, whereas when it's too low you won't. I'm not sure how to set something like that up properly tho and I don't know where to look for information about it. Does anyone have any tips for me?
Title: Re: Making a color calibration tool...
Post by: joe_7 on August 19, 2015, 07:40:09 pm
You probably want to convert each palette color to HSV, adjust the saturation, then convert back to RGB. Here is some code if you're game lib doesn't support those conversions:

http://www.cs.rit.edu/~ncs/color/t_convert.html#RGB%20to%20HSV%20&%20HSV%20to%20RGB (http://www.cs.rit.edu/~ncs/color/t_convert.html#RGB%20to%20HSV%20&%20HSV%20to%20RGB)