May 20, 2024, 09:26:18 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Shader - A colour tint selector

Started by GWS, October 08, 2008, 03:07:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GWS

October 08, 2008, 03:07:20 PM Last Edit: October 08, 2008, 03:10:48 PM by GWS
Hi folks,

Here's my latest program to help select that particular shade you want for colouring a window, text box, button etc.

It uses the Hue, Saturation, Lightness model of colour.   Hue values range from 0 to 360 degrees, with Red at 0 degrees.
Saturation is the amount of colour in the shade, ranging from 1.0 (full colour) to 0.0 (No colour .. ie.Grey).
Lightness as the name implies ranges from 1.0 (White) to 0.0 (Black) - normal colour is when L = 0.5.

Once you select the basic colour you fancy from screen 1, you then get screen2, which shows a wide range of shades for that colour.
These are based on a Saturation value of 0.7.  There is a Saturation scroll that allows you to vary the saturation to increase or reduce the amount of colour in the shade boxes.

Select the shade you want and you get screen 3.   This allows you to fine tune the shade, and then save either the RGB or Hex colour value to the clipboard for pasting into your CBasic code.

You will need the background graphic shaded.jpg in the same directory as the program for it to look nice ..  ;)

Hope you find it useful ..  :)

Graham




Tomorrow may be too late ..

aurelCB

Excellent GWS :)
You give me idea for similiar program but i will tray put whole pick coloring in one toolwindow
and another toolwindow will be toolbox with brushes,pencils and others.
regards
zlatko