scriptkitty Posted March 22, 2004 Posted March 22, 2004 ok, this little function should allow you to use PixelGetColor to work on other systems that might have thier gamma or color corrections different from your own. function: Func colorcheck() SplashTextOn("screentest", "", -1, -1, 0, 0, 1, "", 24) $colorcorection="D8E9EC"; your value of splashtext goes here. $var = Hex(PixelGetColor(10, 100), 6) SplashOff() Return dec($colorcorection)-dec($var) EndFunc Example of usage: SplashTextOn("screentest", "", -1, -1, 0, 0, 1, "", 24) $var = Hex(PixelGetColor(10, 100), 6) SplashOff() $colorcorection="D8E9EC"; my AutoIt color of splashscreen $variance=colorcheck() MsgBox(1,"Hex Values",$colorcorection&"-system value"& @CRLF &$var&"-Your Value") MsgBox(1,"Decimal with correction",dec($var)&"-system value"& @CRLF &dec($colorcorection)-$variance &@CRLF &"Original Dec="&dec($colorcorection) ) MsgBox(1,"Color correction",$var&"-system value"& @CRLF &hex(dec($colorcorection)-$variance,6) & @CRLF &"Original Hex="&$colorcorection) Func colorcheck() SplashTextOn("screentest", "", -1, -1, 0, 0, 1, "", 24) $colorcorection="D8E9EC"; your value of splashtext goes here. $var = Hex(PixelGetColor(10, 100), 6) SplashOff() Return dec($colorcorection)-dec($var) EndFunc If you like to use Decimal colors: Func colorcheck() SplashTextOn("screentest", "", -1, -1, 0, 0, 1, "", 24) $colorcorection="14215660"; your dec value of splashtext goes here. $var = PixelGetColor(10, 100) SplashOff() Return $colorcorection-$var EndFunc AutoIt3, the MACGYVER Pocket Knife for computers.
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