[ View Thread ] [ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

BGonline.org Forums

Math question: color of the confidence indicator

Posted By: maxim
Date: Friday, 24 June 2011, at 6:38 a.m.

In Response To: Math question: color of the confidence indicator (eXtreme Gammon)

Xavier.

I just created a linear gradient from red to green in Photoshop, and it looks fine to me for the purpose of showing confidence.

One thing I changed is that I used L*a*b color space. In that space the gradient went from red to green goes through nice yellowish tone rather than through that dirty mix of green and red in the middle. So, if you transform the colors to Lab, mix the gradient and transform back to rgb you will get the same result. (I will send you the example by email soon.)

However I remember that for one of my projects I had to compress the middle of that range with 'sine' function: C = Math.sin(P * Math.PI / 2);

Another option is to use SMIL-interpolator, or any kind of symmetrical 'easing' (animation concept) but applied to color instead of time like exponential-in-out, quadratic-in-out, cubic-in-out etc, depending on the desired effect.

I can send you the code for lab tranformation, SMIL, easing etc, but you will have to convert from Java to C++ :)

Messages In This Thread

 

Post Response

Your Name:
Your E-Mail Address:
Subject:
Message:

If necessary, enter your password below:

Password:

 

 

[ View Thread ] [ Post Response ] [ Return to Index ] [ Read Prev Msg ] [ Read Next Msg ]

BGonline.org Forums is maintained by Stick with WebBBS 5.12.