AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WhatColor v4.60e - A Must For ColorBlinds Using PC.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources
View previous topic :: View next topic  
Author Message
BoBo
Guest





PostPosted: Tue Oct 05, 2004 8:30 pm    Post subject: WhatColor v4.60e - A Must For ColorBlinds Using PC. Reply with quote

Registration fee of WhatColor is US$8.00 Rolling Eyes
I'm sure with AHK's PixelGetColor/ToolTip/... someone could offer an equivalent for free Wink

Eh, is there any standard naming convention for colours ?

WhatColor v4.60e [more...]
Back to top
BoBo
Guest





PostPosted: Tue Oct 05, 2004 9:36 pm    Post subject: Reply with quote

#RGB-value | Colour Name
Back to top
Wingfat



Joined: 23 Aug 2004
Posts: 193
Location: East Bay, California USA

PostPosted: Tue Oct 05, 2004 9:44 pm    Post subject: Reply with quote

sweet BoBo!!! that is a nice link there!
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Tue Oct 05, 2004 10:06 pm    Post subject: Reply with quote

For German speaking colourblinds Wink

Liste nach folgendem Muster (Link): z.B. antiquewhite|Antikweiß|#FAEBD7

Someone knows ho to "translate"/convert AHK's PixelGetColor-Outputvar to its assigned HexCode (to be able to connect it to its "real name") ?

@Wingfat
No big deal. Google for netscape colours and you'll get tons of links Wink
Back to top
BoBo
Guest





PostPosted: Tue Oct 05, 2004 10:17 pm    Post subject: Reply with quote

Last & the least (for today) Laughing

Link: RAL classic Farbnamen

Quote:
Das RAL - System (=Reichsangepasste Landesfarbe aus dem Vorkriegs-Deutschland - 1927 !) ist kein eigentliches System, sondern eine willkürliche Sammlung von gebräuchlichen Farben. Die Kommunikation funktioniert dank weiter Verbreitung.
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10465

PostPosted: Tue Oct 05, 2004 11:09 pm    Post subject: Reply with quote

The Pixel commands use BGR (blue green red) format for their colors, unlike SplashImage and GUI, which use RGB. If you convert a BGR value to hex, that will give you some idea what color it really is: The first two digits are the blue component, the second are the green, and the final two are the red.

I'm planning to change the color format shown by WindowSpy to hex so that it is easier to tell the hue of the color just by looking at it. The two Pixel commands already support hex values should anyone care to use them now.
Back to top
View user's profile Send private message Send e-mail
BoBo
Guest





PostPosted: Wed Oct 06, 2004 8:34 am    Post subject: Reply with quote

Perfect. Thx Chris.

Cool
Back to top
BoBo
Guest





PostPosted: Wed Oct 06, 2004 1:46 pm    Post subject: Reply with quote

RGB to Color Name Mapping (Triplet and Hex)
Back to top
BoBo
Guest





PostPosted: Mon Oct 11, 2004 8:27 am    Post subject: Reply with quote

If I use PixelGetColor on a red pixel it delivers this value: 0xff
Unfortunately that format isn't following a kinda standard (6 chars) which is used to set a colour in HTML/web code.

RGB: 255,0,0 --> Hex: FF0000
BGR: 0,0,255 --> Hex: 0000FF

If I use StringTrimLeft on 0xff to extract --> ff, I still won't be able to match against a list of values cause FF would match C6E2FF (SlateGray) or FFFFFF (Grey) or > 100 other colours as well.

Any idea? Can PGC get fixed to provide the "00" value(s) of a colour as well ?
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10465

PostPosted: Mon Oct 11, 2004 12:54 pm    Post subject: Reply with quote

Quote:
Registration fee of WhatColor is US$8.00
I'm sure with AHK's PixelGetColor/ToolTip/... someone could offer an equivalent for free
Here is a topic that lists several free alteratives, though I'm not sure they each have all the features of WhatColor: http://www.autohotkey.com/forum/viewtopic.php?t=1034
Back to top
View user's profile Send private message Send e-mail
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10465

PostPosted: Mon Oct 11, 2004 1:12 pm    Post subject: Reply with quote

Quote:
Can PGC get fixed to provide the "00" value(s) of a colour as well ?
That's a good idea and I've made that change. It will be in the version released tomorrow. Thanks.

BoBo wrote:
If I use PixelGetColor on a red pixel it delivers this value: 0xff
Unfortunately that format isn't following a kinda standard (6 chars) which is used to set a colour in HTML/web code.
Perhaps you weren't even proposing a switch from BGR to RGB format, but here are some thoughts about that anyway:

It seems to me that the benefit of switching PixelGetColor and PixelSearch to RGB vs. BGR format is small compared to the cost. The cost is that all exising pixel-using scripts would be broken unless users remembered to add a #UseBGR directive at the top of each such script after upgrading.

If anyone sees some benefit to switching to RGB beyond the consistency/niceness factor, please post it here. For example, if you use PixelGetColor to somehow generate HTML background colors or web page colors, please mention that.

Maybe a poll is in order (switch to RGB vs. leave it alone), though I suspect the results would be biased because forum visitors tend to be heavy users of AutoHotkey and thus do not represent the more typical, casual user.

By the way, I've changed Window Spy to a hopefully more useful layout. Comments are welcome:

Back to top
View user's profile Send private message Send e-mail
BoBo
Guest





PostPosted: Mon Oct 11, 2004 1:50 pm    Post subject: Reply with quote

Thx Chris. I've added a tool as well to that thread a few secs ago.

Non of those (as I've checked them) provides the "name" of a colour once it has been detected, that what makes it interesting for colour blinds.

AHK's tool tips are perfect. Working like a charm.

But I can't use AHK in this case cause colours like Red won't get statet completely with each of its single values.
In this case its values are R = 255, G = 0, B = 0
As 255 = FF it's not possible to identify against >500 strings if its the R,G or B value.

My matching pattern. Colourname, BGR,RGB(Hex)

black,000,000000
grey,190190190,BEBEBE
DimGrey,105105105,696969
LightGray,211211211,D3D3D3
LightSlateGrey,153136119,778899
SlateGray,144128112,708090
SlateGray1,255226198,C6E2FF
SlateGray2,238211185,B9D3EE
SlateGray3,205182159,9FB6CD
SlateGray4,139123108,6C7B8B
SlateGrey,144128112,708090
.
red,00255,FF0000
.
.
.

Cool
Back to top
BoBo
Guest





PostPosted: Mon Oct 11, 2004 1:54 pm    Post subject: Reply with quote

Quote:
That's a good idea and I've made that change. It will be in the version released tomorrow.


You made my day Very Happy
Thx a million.

btw: I don't care if AHK uses BGR<>RGB as I'll convert its values if necessary.

Cool
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10465

PostPosted: Mon Oct 11, 2004 2:18 pm    Post subject: Reply with quote

Quote:
As 255 = FF it's not possible to identify against >500 strings if its the R,G or B value.
I'm not sure if this will help you (you may know about it already):

Here is a demo script to extract the individual colors from a BGR value:
Code:
#Persistent
SetTimer, WatchPixel, 100
return

WatchPixel:
MouseGetPos, x, y
PixelGetColor, color, %x%, %y%

SetFormat, integer, hex
Transform, Blue, BitShiftRight, %color%, 16
Transform, Green, BitAnd, %color%, 0x00FF00
Transform, Green, BitShiftRight, %Green%, 8
Transform, Red, BitAnd, %color%, 0x0000FF
SetFormat, integer, d

ToolTip, %color%`nBlue = %Blue%`nGreen = %Green%`nRed = %Red%
return

Using the extracted color components above, you could range-check each color number to match it to the closest color name.
Back to top
View user's profile Send private message Send e-mail
BoBo
Guest





PostPosted: Mon Oct 11, 2004 2:53 pm    Post subject: Reply with quote

Thx Chris for the script. Much appreciated. Very Happy

About the concept to use a directive like this: #UseBGR
IMHO that makes sense. Smile

Creating such kinda directive would provide the option of additional colour formats if once requested/needed. If done now it won't harm definitely less people as if done "the day after tomorrow" (have I ever mentioned that I like that movie Wink ).

I doubt that it wouldn't be a big thing to identify a bunch of scripts for such single line "update", using

Run, %COMSPEC% find "Pixel" C:\*.ahk > C:\MyScriptsUsingAPixelCmd.txt
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group