Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

WhatColor v4.60e - A Must For ColorBlinds Using PC.


  • Please log in to reply
17 replies to this topic
BoBo
  • Guests
  • Last active:
  • Joined: --
Registration fee of WhatColor is US$8.00 :roll:
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...]

BoBo
  • Guests
  • Last active:
  • Joined: --
#RGB-value | Colour Name

Wingfat
  • Members
  • 937 posts
  • Last active: Oct 14 2015 04:20 PM
  • Joined: 23 Aug 2004
sweet BoBo!!! that is a nice link there!

BoBo
  • Guests
  • Last active:
  • Joined: --
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:

BoBo
  • Guests
  • Last active:
  • Joined: --
Last & the least (for today) :lol:

Link: RAL classic Farbnamen

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.



Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
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.

BoBo
  • Guests
  • Last active:
  • Joined: --
Perfect. Thx Chris.

8)

BoBo
  • Guests
  • Last active:
  • Joined: --
RGB to Color Name Mapping (Triplet and Hex)

BoBo
  • Guests
  • Last active:
  • Joined: --
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 ?

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

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.autohotke...opic.php?t=1034

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

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.

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:

Posted Image

BoBo
  • Guests
  • Last active:
  • Joined: --
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
.
.
.

8)

BoBo
  • Guests
  • Last active:
  • Joined: --

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


You made my day :D
Thx a million.

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

8)

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

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:
#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.

BoBo
  • Guests
  • Last active:
  • Joined: --
Thx Chris for the script. Much appreciated. :D

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

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