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

Juan Vuletich juan at jvuletich.org
Sat Jan 26 15:19:39 CST 2013


Hi Ken,

I really like this stuff. I'd like to integrate it into Cuis. I think it 
would be best if:
- Behavior is integrated in class Color, avoiding the need for a new class
- A few smaller dictionaries are included.
- Bigger dictionaries (full XKCD, CSS3) are in an optional package
- It is easy for people to define new dictionaries for use in their own 
packages.

Would you consider adapting it this way?

Thanks,
Juan Vuletich

Ken Dickey wrote:
> 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
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Cuis mailing list
> Cuis at jvuletich.org
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>   





More information about the Cuis mailing list