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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Hannes Hirzel
On 1/25/13, Ken Dickey <[hidden email]> wrote:
> On Fri, 25 Jan 2013 00:18:37 -0300
.....
>
> But this is very useful for exploring NamedColors!
>
> Thanks for adding the update!
> -KenD
>

Hello Ken

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
?

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

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

Kind regards
Hannes

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: https://github.com/KenDickey/Cuis-NamedColors

KenDickey
On Sat, 26 Jan 2013 04:49:13 +0000
"H. Hirzel" <[hidden email]> 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
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org

Color-named colors.st (1K) Download Attachment
Color-rgbDistance.st (552 bytes) Download Attachment
Color-asNamedColor.st (322 bytes) Download Attachment
-KenD
Reply | Threaded
Open this post in threaded view
|

Re: https://github.com/KenDickey/Cuis-NamedColors

Juan Vuletich-4
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" <[hidden email]> 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
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>  


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: https://github.com/KenDickey/Cuis-NamedColors

KenDickey
On Sat, 26 Jan 2013 18:19:39 -0300
Juan Vuletich <[hidden email]> wrote:

> 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

Will do.

> - A few smaller dictionaries are included.
> - Bigger dictionaries (full XKCD, CSS3) are in an optional package

NamedColor traditionalColorNames size. "36"
NamedColor xkcdFirst48 size.           "48"
NamedColor css2NamedColors size.      "147"
NamedColor nbsisccNamedColors size.   "267"
NamedColor css3NamedColors size.      "515"
NamedColor xkcdNamedColors size.      "949"

I would suggest merging traditional + xkcdFirst48 as the default, and moving CSS2, as well as CSS3, NBS-ISSC, and XKCD into separate packages.  Perhaps the Useful Expressions window could show the code to load CSS3 and XKCD color names.

> - It is easy for people to define new dictionaries for use in their own
> packages.

Good idea.

> Would you consider adapting it this way?

Sure.  I'll put something together to try out.


Cheers,
-KenD

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
-KenD
Reply | Threaded
Open this post in threaded view
|

Re: https://github.com/KenDickey/Cuis-NamedColors

Juan Vuletich-4
Hi Ken,

Ken Dickey wrote:

> On Sat, 26 Jan 2013 18:19:39 -0300
> Juan Vuletich <[hidden email]> wrote:
>
>  
>> 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
>>    
>
> Will do.
>
>  
>> - A few smaller dictionaries are included.
>> - Bigger dictionaries (full XKCD, CSS3) are in an optional package
>>    
>
> NamedColor traditionalColorNames size. "36"
> NamedColor xkcdFirst48 size.           "48"
> NamedColor css2NamedColors size.      "147"
> NamedColor nbsisccNamedColors size.   "267"
> NamedColor css3NamedColors size.      "515"
> NamedColor xkcdNamedColors size.      "949"
>
> I would suggest merging traditional + xkcdFirst48 as the default, and moving CSS2, as well as CSS3, NBS-ISSC, and XKCD into separate packages.  Perhaps the Useful Expressions window could show the code to load CSS3 and XKCD color names.
>
>  

Yes! Sounds great.

>> - It is easy for people to define new dictionaries for use in their own
>> packages.
>>    
>
> Good idea.
>
>  
>> Would you consider adapting it this way?
>>    
>
> Sure.  I'll put something together to try out.
>
>
> Cheers,
> -KenD
>  

Thanks Ken!

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org