AuthorTopic: Making a color calibration tool...  (Read 1498 times)

Offline ErekT

  • 0010
  • *
  • Posts: 330
  • Karma: +0/-0
  • fistful of pixels
    • View Profile

Making a color calibration tool...

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?

Offline joe_7

  • 0001
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
    • Rendera

Re: Making a color calibration tool...

Reply #1 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