|
-
Sep 5th, 2008, 08:24 PM
#1
[RESOLVED] Inverting colors
How do you invert colors? My guess to just subtract it from vbWhite, but that would mean inverted gray is gray, so that can't be right.
Anyone know?
-
Sep 5th, 2008, 08:53 PM
#2
-
Sep 5th, 2008, 08:56 PM
#3
Re: Inverting colors
Wild guess....Have you tried using Xor?
Maybe something like,
NewColor = 255 Xor TheColor
or
NewColor = vbWhite Xor TheColor
?
-
Sep 5th, 2008, 09:50 PM
#4
Re: Inverting colors
 Originally Posted by RhinoBull
That's the solution I proposed in the OP: subtract it from vbWhite. Thanks much for the link confirming this is how to do it.
Last edited by Ellis Dee; Sep 5th, 2008 at 09:54 PM.
-
Sep 5th, 2008, 09:54 PM
#5
Re: Inverting colors
 Originally Posted by Edgemeal
Wild guess....Have you tried using Xor?
Maybe something like,
NewColor = 255 Xor TheColor
or
NewColor = vbWhite Xor TheColor
?
Looks like we both guessed correctly, as doing an Xor like that is functionally equivalent to subtracting the color from vbWhite, and RhinoBull's link confirms that subtracting the color from vbWhite is indeed how you invert a color.
I like the Xor method better, though, because it's chock full of computery goodness.
-
Sep 5th, 2008, 10:02 PM
#6
Re: [RESOLVED] Inverting colors
because it's chock full of computery goodness.
I'm not sure what that really means, but it sounds good!
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
|