RunescapeNerd Posted July 30, 2008 Posted July 30, 2008 I need to get the values of the string(hex RGB) on certain positions. for example, I want $R=AA by getting the AA from AABB0A then, i want $R=AA=10*16+10=170 all i want are the decimal RGB values of a hex RGb value , ex. (256, 110, 23) Can anyone help me? I rule the world, bow in my honor.no, im not Zezima, but i bow down in his honor
weaponx Posted July 30, 2008 Posted July 30, 2008 Open up C:\Program Files\AutoIt3\Include\Color.au3, there are three simple functions at the bottom that will provide what you need.
Polyphem Posted July 30, 2008 Posted July 30, 2008 Or maybe this one?#552225 This post will be edited again by Polyphem: Tomorrow, 11:55 AM
weaponx Posted July 30, 2008 Posted July 30, 2008 (edited) Or maybe this one? #552225That is an ugly piece of code. This is as simple as it gets. $nColor = 0xAABB0A $Blue = BitAND($nColor, 0xFF) $Green = BitAND(BitShift($nColor, 8), 0xFF) $Red = BitAND(BitShift($nColor, 16), 0xFF) ConsoleWrite("Red: " & $Red & " Green: " & $Green & " Blue: " & $Blue & @CRLF) Edited July 30, 2008 by weaponx
Polyphem Posted July 30, 2008 Posted July 30, 2008 That is an ugly piece of code.Me > You > ...as always a pleasure to help... This post will be edited again by Polyphem: Tomorrow, 11:55 AM
RunescapeNerd Posted July 30, 2008 Author Posted July 30, 2008 thanks I rule the world, bow in my honor.no, im not Zezima, but i bow down in his honor
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