|
-
Nov 27th, 2001, 11:42 PM
#1
Thread Starter
Addicted Member
Recolor Image
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
-
Nov 27th, 2001, 11:47 PM
#2
Thread Starter
Addicted Member
my image didn't really work
._______
{_..........|
{_|.........|
{_|.........|
...|.........|
...|_____|
Just ignore all of the .'s
-
Nov 28th, 2001, 08:16 AM
#3
Good Ol' Platypus
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.
VB Code:
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
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|