gehenna Posted March 12, 2009 Share Posted March 12, 2009 when i use the pixelGetColor function i get a big integer. what i was wandering is how can i turn this into the rgb model (though it apparently already is, just in a different format), so that i could separately see the Red, Green, and Blue composing this color. (where black would be (0,0,0) and white (255,255,255)). anyone know how these three numbers are used to form the big integer you get with that function? and how to get these three numbers out of that integer? thank you for your help Link to comment Share on other sites More sharing options...
jvanegmond Posted March 12, 2009 Share Posted March 12, 2009 $Color = Dec(0xFFFFFF) ; value = 16782893778 something $Hex = Hex($Color, 6) ; value = 0xFFFFFF $StrHex = StringTrimLeft(String($Hex),2) ; value = FFFFFF github.com/jvanegmond Link to comment Share on other sites More sharing options...
gehenna Posted March 12, 2009 Author Share Posted March 12, 2009 $Color = Dec(0xFFFFFF) ; value = 16782893778 something$Hex = Hex($Color, 6) ; value = 0xFFFFFF$StrHex = StringTrimLeft(String($Hex),2) ; value = FFFFFFim sory, guess i am a little slow, but how do i get the classic rgb format (red, green, blue) from this? Link to comment Share on other sites More sharing options...
jvanegmond Posted March 12, 2009 Share Posted March 12, 2009 im sory, guess i am a little slow, but how do i get the classic rgb format (red, green, blue) from this? #include <Misc.au3> $Color = Dec(0xFFFFFF) ; value = 16782893778 something $Hex = Hex($Color, 6) ; value = 0xFFFFFF $StrHex = StringTrimLeft(String($Hex),2) ; value = FFFFFF $StrRed = StringMid($StrHex,0,2) ; value = FF $Red = _ColorGetRed($Red) ; value = 255 $HexRed = Hex($Red,2) ; value = 0xFF $StrRed2 = StringTrimLeft($HexRed, 2) ; value = FF ( different method ) Same for other colors. Before you ask how to do it for green and blue check the help file what this really does and means. github.com/jvanegmond Link to comment Share on other sites More sharing options...
gehenna Posted March 12, 2009 Author Share Posted March 12, 2009 #include <Misc.au3> $Color = Dec(0xFFFFFF) ; value = 16782893778 something $Hex = Hex($Color, 6) ; value = 0xFFFFFF $StrHex = StringTrimLeft(String($Hex),2) ; value = FFFFFF $StrRed = StringMid($StrHex,0,2) ; value = FF $Red = _ColorGetRed($Red) ; value = 255 $HexRed = Hex($Red,2) ; value = 0xFF $StrRed2 = StringTrimLeft($HexRed, 2) ; value = FF ( different method ) Same for other colors. Before you ask how to do it for green and blue check the help file what this really does and means. _ColorGetRed thanks for your help, this is what i needed Link to comment Share on other sites More sharing options...
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