ravenfyre Posted March 10, 2004 Share Posted March 10, 2004 (edited) I ran a test looking for these colors, R188, G108 and B110.Photoshop shows: 0xBC6C6E in hexAutoIt Spy shows: 0x6E6BC1 in hexI 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 . Edited March 10, 2004 by ravenfyre Link to comment Share on other sites More sharing options...
scriptkitty Posted March 10, 2004 Share Posted March 10, 2004 (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 March 10, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Josbe Posted March 10, 2004 Share Posted March 10, 2004 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) AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
ravenfyre Posted March 10, 2004 Author Share Posted March 10, 2004 (edited) Thank you for the quick replies. I switched the hex values around and now it works perfectly. Thank you for the help Now that it works I got another questions lol, it's different so I guess new topic . Edited March 10, 2004 by ravenfyre Link to comment Share on other sites More sharing options...
Administrators Jon Posted March 10, 2004 Administrators Share Posted March 10, 2004 (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 That means my UDFs for getting Red and Blue are reversed too. Pretty much impossible to fix now with the amount of people using the pixel functions Edited March 10, 2004 by Jon Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Valik Posted March 10, 2004 Share Posted March 10, 2004 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 That means my UDFs for getting Red and Blue are reversed too. Pretty much impossible to fix now with the amount of people using the pixel functions 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. Link to comment Share on other sites More sharing options...
jpm Posted March 10, 2004 Share Posted March 10, 2004 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 toOpt("PixelFixBecauseLittleEndian", 1) Link to comment Share on other sites More sharing options...
scriptkitty Posted March 10, 2004 Share Posted March 10, 2004 I am fine with anything you guys wish to do, except to kill the messenger. AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Administrators Jon Posted March 10, 2004 Administrators Share Posted March 10, 2004 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. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Josbe Posted March 16, 2004 Share Posted March 16, 2004 ...impossible shouldn't be in your vocabulary.Yes!. Opt("PixelFixBecauseMicrosoftIsStupid", 1) hehe, Also, would can be like jpm. Really, always I had doubt on this output (BGR). But I accepted it this way. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta 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