Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Color bar Interpolation

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 irisraj   Members   

128
Like
0Likes
Like

Posted 23 July 2014 - 11:25 AM

 
 
 
 
 
I have a Colorbar (Row of colors)  representing  1000s of  color.
The colorbar has  two sliders  on the top of it. When I move the sliders, I should get the  color represented by  lower slider and upper slider. I cannot  apply  Interpolation to get these extremes. because  R, G, B components 
not moving in linear fashion. In first  1/3rd of colorbar  R is  increasing,  B is decreasing, but G is constant.
next 1/4 th R is increasing, B is constant, G is decreasing and so on. 
 
How can I create mathematical model,so  that I can get a exact color values of chosen sliders. 
 
 
Sorry for my poor English 


#2 fastcall22   Moderators   

10683
Like
2Likes
Like

Posted 23 July 2014 - 11:59 AM

Use either of the HSL or HSV color spaces, interpolate in that space, and then convert to RGB when needed.
zlib: eJzVVLsSAiEQ6/1qCwoK i7PxA/2S2zMOZljYB1TO ZG7OhUtiduH9egZQCJH9 KcJyo4Wq9t0/RXkKmjx+ cgU4FIMWHhKCU+o/Nx2R LEPgQWLtnfcErbiEl0u4 0UrMghhZewgYcptoEF42 YMj+Z1kg+bVvqxhyo17h nUf+h4b2W4bR4XO01TJ7 qFNzA7jjbxyL71Avh6Tv odnFk4hnxxAf4w6496Kd OgH7/RxC




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.