3 Replies - 567 Views - Last Post: 01 February 2012 - 08:43 PM

Topic Sponsor:

#1 Flipside  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 70
  • Joined: 03-July 09

Generate Colour Map

Posted 31 January 2012 - 11:43 PM

Hi,

I'm looking to generate a colour map like the image below and display it on the screen. Any/all guidance welcome, but the thing I'm trying to figure out right now is the math behind it (with respect to the RGB values). It seems that as you move horizontally, the RGB values all change relative to each other (i.e. higher red, lower blue/green), and then as you move vertically, the RGB values all change collectively (i.e. all move towards the colour being grey). I'm not sure how to code this though and I can't even seem to find an example somewhere on Google - maybe I'm not searching for the correct terms. Anyways, thanks in advance for any help!

Posted Image

Is This A Good Question/Topic? 0
  • +

Replies To: Generate Colour Map

#2 JackOfAllTrades  Icon User is online

  • No Sugar Coding Here!
  • member icon

Reputation: 4685
  • View blog
  • Posts: 20,364
  • Joined: 23-August 08

Re: Generate Colour Map

Posted 01 February 2012 - 05:23 AM

Where you're not looking for code, just the math behind it, I'll move this to Software Development
Was This Post Helpful? 0
  • +
  • -

#3 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 1107
  • View blog
  • Posts: 2,652
  • Joined: 11-December 07

Re: Generate Colour Map

Posted 01 February 2012 - 07:21 PM

I think that palette might be easier understood in HLS. Across the way the hue is changing. Down the way, it's the saturation. Googling for the maths behind the conversion from HLS to RGB might be a good start.
Was This Post Helpful? 1
  • +
  • -

#4 Flipside  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 70
  • Joined: 03-July 09

Re: Generate Colour Map

Posted 01 February 2012 - 08:43 PM

View Postcfoley, on 01 February 2012 - 07:21 PM, said:

I think that palette might be easier understood in HLS. Across the way the hue is changing. Down the way, it's the saturation. Googling for the maths behind the conversion from HLS to RGB might be a good start.

Thanks for the reply. I will look into it.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1