Colour Shade

I wanted to be able to generate the shades of a particular colour.

This site has many themes with one main colour for the links and lines. But I wanted to be able to input the hex colour, that I had picked from the banner photo, and find a lighter shade for the menu section at the bottom.

Eric Meyer has written a Color Blender and I thought that I could do something similar using Ruby.

The program just takes the colour in hex (e.g. #ff0000 or even #f00), the shade number that you want and a number for the scale. Positive shade numbers make the colour lighter, negative numbers darker. Scale tops out at 100 and defaults to 10.

  • Posted on Sunday, 23 July 2006
  • Tagged with rails ruby