Hex web colours
Posted
by Mick
on Stack Overflow
See other posts from Stack Overflow
or by Mick
Published on 2010-04-24T19:44:49Z
Indexed on
2010/04/24
19:53 UTC
Read the original article
Hit count: 355
Hi I am displaying a colour as a hex value in php . Is it possible to vary the shade of colour by subtracting a number from the hex value ? What I want to do it display vivid web safe colour but if selected I want to dull or lighten the colour. I know I can just use two shades of colour but I could hundred of potential colours .
to be clear #66cc00 is bright green and #99ffcc is a very pale green . What do i subtract to get the second colour ? is there any formula because I just can get it .
Thanks for any help
Cheers
© Stack Overflow or respective owner