[DX9] Color Spectrum

Started by
0 comments, last by MJP 16 years, 3 months ago
I have been working on trying to get a color spectrum (such as Photoshop's or MSPaint) for some time now and I just can not get it to work. Basically I am having a problem drawing the correct colors. Does anyone know a tutorial that would help put me back on the right path?
Advertisement
Are you talking about this thing? That's the Color Dialog Box, part of the Common Dialog Library in with Windows API. This MSDN page talks about it and how the HSL values are laid out on the rectangle.

If you need to draw it in D3D, probably the easiest way to do it is to draw a quad with the appropriate H & S values set as texture coordinates for the corners of the quad. Then you can pass them through the vertex shader so they're interpolated, and for each pixel perform the HSL to RGB conversion.

This topic is closed to new replies.

Advertisement