[Cuis] https://github.com/KenDickey/Cuis-NamedColors

Ken Dickey Ken.Dickey at whidbey.com
Sat Jan 26 11:48:24 CST 2013


On Sat, 26 Jan 2013 04:49:13 +0000
"H. Hirzel" <hannes.hirzel at gmail.com> wrote:
...
> Good to see you working on color names utilities.
> 
>     https://github.com/KenDickey/Cuis-NamedColors.git
> 
> Is this a port of Stéphane Rollandin's Color package
>     http://map.squeak.org/package/4fcb1d4d-ff16-46e2-bfa8-a7410f0cd5a3
> ?

No.  I did some exploration in Cuis a couple of years ago or more with extending Color.

My goal at this point is an add-on package which does not interfere with Color.  It would be easier to extend Color if Juan finds it useful.  E.g. I just pushed the addition of NamedColor constructors which just invoke super and then apply  asNamedColor.  There should be a meta-level way to do this for Color constructors to answer NamedColors rather than Colors. It is a real kludge.

Again, the goal is to allow playing around with color names before deciding what, if anything, should go into core.

Thanks for the reference, by the way!  I'll take a look at Stéphane Rollandin's Color package shortly.

> Where do I find the reference for the color data source?

The current NamedColor class comment gives web references.  I chose what seemed to me to be the most interesting color name sets.  The Wikipedia reference cross links to a whole bunch of color dictionarys and color model info.

My personal favorate naming is XKCD which comes from the names most of the surveyed people agree upon. But one can argue that CSS3 would be more useful for creating Web pages.

> Could the color names be made available in other languages as well?

Certainly.  Just add another color dictionary creator to NamedColor and a useXXX method to switch to that dictionary and all should work for you.

I just sent some code to Juan, by the way, in hope that he will add it to the Color class.  It takes a Color and a dictionary and answers the closest named color. [attached]  The latest push of NamedColors assumes this support in Color.

My guess about where this will end up is a bit of support for a small default named color dictionary in core and a package for each color dictionary. This would let anyone add whichever color naming set they prefer or find most useful.

I can certainly see people wanting a drawing program or web authoring wanting to use different color names -- and certainly other color languages. 

Cheers,
-KenD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Color-named colors.st
Type: application/octet-stream
Size: 1061 bytes
Desc: not available
URL: <http://jvuletich.org/pipermail/cuis_jvuletich.org/attachments/20130126/8ab2d45b/attachment-0012.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Color-rgbDistance.st
Type: application/octet-stream
Size: 401 bytes
Desc: not available
URL: <http://jvuletich.org/pipermail/cuis_jvuletich.org/attachments/20130126/8ab2d45b/attachment-0013.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Color-asNamedColor.st
Type: application/octet-stream
Size: 233 bytes
Desc: not available
URL: <http://jvuletich.org/pipermail/cuis_jvuletich.org/attachments/20130126/8ab2d45b/attachment-0014.obj>


More information about the Cuis mailing list