PDA

Click to See Complete Forum and Search --> : Recolor Image


Gary007
Nov 27th, 2001, 10:42 PM
I am building a replacement for the TabStrip control, and am having trouble drawing my images to a custom color.
My control looks something like this where the tabs are down the left hand side.
_____
{_ |
{ | |
{ | |
|____|
These tabs are black and white images and I would like to be able to recolor these to a custom color.

I know it is simple but I cant get it to recolor the image and make the background of the image transparent. Can anyone please tell me how to do this??

Thanks

Gary007
Nov 27th, 2001, 10:47 PM
my image didn't really work
._______
{_..........|
{_|.........|
{_|.........|
...|.........|
...|_____|

Just ignore all of the .'s

Sastraxi
Nov 28th, 2001, 07:16 AM
You can convert to the HSB colour scheme, then increase the saturation to 100%, and change the hue to a random number. Then you can convert it back to RGB.

Another way would be to have R, G, and B values (decimals) that you multiply by what they have, and that gives you a new colour. Eg.Function Colour(R As Long, G As Long, B As Long, cR As Single, cG As Single, cB As Single)
R = Round(R * cR)
G = Round(G * cR)
B = Round(B * cR)
End Function