I’m developing an aplication that loads a dynamic color from a XML file. In some ocasions, I need the aplication to get a similar but darker color from the hexadecimal I have. Each value would go down 33 in hex (51 in decimal). Something like:
- 0xFFFFFF would become 0xCCCCCC
- 0x6600CC would become 0x330099
The hex values I have are strings.
I just can’t figure out how to solve it in a simple way.
Please, help!
And remember, it’s AS2!
You should search for one of the many colour libraries out there. If you want to do it yourself, you need some understanding of bitwise operators. I think reducing the colours by some percent instead of subtracting could give you a nicer result.