Sign in to follow this  
Followers 0
ravenfyre

Autoit Seeing Different Colors

10 posts in this topic

#1 ·  Posted (edited)

I ran a test looking for these colors, R188, G108 and B110.

Photoshop shows: 0xBC6C6E in hex

AutoIt Spy shows: 0x6E6BC1 in hex

I wrote a script to see what it actually saw. I used photoshop and filled the window with the color and wrote a script to search for either 0xBC6C6E or 0x6E6BC1. Autoit agreed with autoit spy, the color was 0x6E6BC1.

I filled the color in photoshop, yet auto it sees something else. Why is this? In photoshop what autoit spy sees is blue and it's suppose to be reddish in color so it's quite strange. I need to be able to see the right colors as seen in photoshop so I can easily transfer them over to the script but this problem is just slowing me down, especially if I'm working on something that changes shades :whistle:.

Edited by ravenfyre

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hex: 0xDF8A6E Photoshop

Hex: 0x6E8ADF AutoIt

they swap

Hex: 0x DF 8A 6E

Hex: 0x 6E 8A DF

so conversion is simple swap first and last sets of hex, at least with my Adobe Gamma Loader.exe loaded.

It is a bit wierd however.

Photoshop is 0xRdGrBl

red green blue

AutoIt is 0xBlGRRd?

Blue Green Red?

AutoIt says RGB, but it is spitting out BGR atm.

There will be a little loss in color conversions and gamma depending on what you make the file into as well.

Test it yourself, make a 0,100,255 RGB should be a nice blue, but AutoIt will show 255,100,0 in Hex.

Or just move AutoItspy over something dark blue and notice the last hex value, in RGB blue should be high, not say 00.

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

I understand that, AutoIt show the Hex value not like HTML Color Format (like Adobe PS or another prgm.).

Simply change it, like the example scriptkitty's. (BGR) :whistle:

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thank you for the quick replies. I switched the hex values around and now it works perfectly. Thank you for the help :whistle:

Now that it works I got another questions lol, it's different so I guess new topic B).

Edited by ravenfyre

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

And there is the "horror bug". As far as I was concerned the colour should have been RGB, I just rechecked the API docs and the Win pixel functions do indeed return BGR which is crazy. No-one uses BGR :whistle:B)

That means my UDFs for getting Red and Blue are reversed too. :angry:

Pretty much impossible to fix now with the amount of people using the pixel functions :evil:

Edited by Jon

Share this post


Link to post
Share on other sites

And there is the "horror bug".  As far as I was concerned the colour should have been RGB, I just rechecked the API docs and the Win pixel functions do indeed return BGR which is crazy.  No-one uses BGR :whistle:B)

That means my UDFs for getting Red and Blue are reversed too. :angry:

Pretty much impossible to fix now with the amount of people using the pixel functions :evil:

Jon, you're a programmer, impossible shouldn't be in your vocabulary.

Opt("PixelFixBecauseMicrosoftIsStupid", 1)

And then the user can magically change it, of course its up to you if it defaults to the old method or the new, though.

Inellegant? Sure. Should of been unnecessary? Sure. Microsoft are to blame because they don't use "normal" logic sometimes? Sure.

Share this post


Link to post
Share on other sites

Jon, you're a programmer, impossible shouldn't be in your vocabulary.

Opt("PixelFixBecauseMicrosoftIsStupid", 1)

And then the user can magically change it, of course its up to you if it defaults to the old method or the new, though.

Inellegant? Sure.  Should of been unnecessary? Sure.  Microsoft are to blame because they don't use "normal" logic sometimes?  Sure.

You are almost right Valik but the Opt shoud be change to

Opt("PixelFixBecauseLittleEndian", 1)

Share this post


Link to post
Share on other sites

I am fine with anything you guys wish to do, except to kill the messenger. :whistle:


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

What I don't get is that when the gaming forum was active people in there were always talking about taking snapshots then getting the colour from paintshop pro and using it in autoit - and not a single mention.

:whistle:

Share this post


Link to post
Share on other sites

...impossible shouldn't be in your vocabulary.

Yes!. :evil:

Opt("PixelFixBecauseMicrosoftIsStupid", 1)

hehe, :whistle:

Also, would can be like jpm. :lmao:B)

Really, always I had doubt on this output (BGR). But I accepted it this way. :angry:

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0