Paulie Posted August 20, 2006 Posted August 20, 2006 (edited) Okay, I have this code, what I'm trying to do is figure out how to have either a decimal/hex number, and figure out the red green and blue values separately. While 1 For $x1 = 0 to 10;@DesktopWidth For $y1 = 0 to 10;@DesktopHeight $colorD = PixelGetColor($x1, $y1) $colorH = Hex($ColorD) MsgBox(0, $x1&", "&$y1, $ColorH) Next Next WEnd like i know in typical its "0xRRGGBB", but what about hex values like this "0x007094DD" how do i determine whats what (and yes, that does work as a color code even though it's more then six places) Please help Thanks, ---Paulie Edit: forgot my code Edited August 20, 2006 by Paulie
Paulie Posted August 20, 2006 Author Posted August 20, 2006 Check out these UDFs..lol thanks missed those :"> :">
Paulie Posted August 20, 2006 Author Posted August 20, 2006 (edited) one more question,should the first 2 results in this msgbox be the same? why arent they?For $y1 = 0 to 50 For $x1 = 0 to 50 $colorD = PixelGetColor($x1, $y1) $colorH = Hex($ColorD) $Red = _ColorGetRed($colorH) $Green = _ColorGetGreen($colorH) $Blue = _ColorGetBlue($colorH) $color2 = $Red&$Green&$Blue $color2H = Hex($color2) MsgBox(0, $x1&", "&$y1, $ColorH&" : "&$color2H&" : "&$color2) Next NextNmv i found what was wrong, missing a "0x" Edited August 20, 2006 by Paulie
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now