Jump to content

Recommended Posts

Posted

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
Posted

Open up C:\Program Files\AutoIt3\Include\Color.au3, there are three simple functions at the bottom that will provide what you need.

Posted (edited)

Or maybe this one?

#552225

That 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 by weaponx

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...