Proposal: adding 261 named colors

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

Proposal: adding 261 named colors

jfabry
Hi all,

in the work of AspectMaps I was a bit let down by the named colors Pharo provides (Color red et cetera). Now I am happy to say that thanks to the XKCD color survey I was able to improve on this. I can now use 261 named colors thanks to a XKCDColor class, and I'd like to share the code, ideally to be included into Pharo. The code is available in bugreport http://code.google.com/p/pharo/issues/detail?id=3148 

Here is the class comment fo XKCDColor:

---snip---
A color named according to the XKCD color survey, as published in http://blog.xkcd.com/2010/05/03/color-survey-results/ ("Over five million colors were named across 222,500 user sessions.")

Of the full table of 954 colors that is published only those were selected that did not have a space in their name, ignoring e.g. electric lime, nasty green, macaroni and cheese, pinkish tan, but also light light blue, strong blue. This results in a table of 261 named colors, but with duplicates such as ochre and ocre. These were left in since as they are common misspellings it is more convenient for the user.

To instantiate: XCDColor named: aString where aString is one of the 261 named colors. If the name is not known, the color red is instantiated. Instances of XKCDColor know their XKCD color name, returned by the name accessor.

Thanks to Randall Monroe of http://xkcd.com for providing the data.
---snip---

And here is a picture of all the colors (Generated with Mondrian :-) )




--
Johan Fabry  
[hidden email] - http://dcc.uchile.cl/~jfabry
PLEIAD Lab - Computer Science Department (DCC) - University of Chile




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Colors.png (281K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: adding 261 named colors

Schwab,Wilhelm K
I don't like the idea of instantiating red if the name is not recognized.  Since you don't have selectors (900+ might be a bit much), the compiler/Shout won't catch mistakes, and it will be an ongoing source of silent failures.




________________________________________
From: [hidden email] [[hidden email]] On Behalf Of Johan Fabry [[hidden email]]
Sent: Saturday, October 23, 2010 5:29 PM
To: Pharo Development
Subject: [Pharo-project] Proposal: adding 261 named colors

Hi all,

in the work of AspectMaps I was a bit let down by the named colors Pharo provides (Color red et cetera). Now I am happy to say that thanks to the XKCD color survey I was able to improve on this. I can now use 261 named colors thanks to a XKCDColor class, and I'd like to share the code, ideally to be included into Pharo. The code is available in bugreport http://code.google.com/p/pharo/issues/detail?id=3148

Here is the class comment fo XKCDColor:

---snip---
A color named according to the XKCD color survey, as published in http://blog.xkcd.com/2010/05/03/color-survey-results/ ("Over five million colors were named across 222,500 user sessions.")

Of the full table of 954 colors that is published only those were selected that did not have a space in their name, ignoring e.g. electric lime, nasty green, macaroni and cheese, pinkish tan, but also light light blue, strong blue. This results in a table of 261 named colors, but with duplicates such as ochre and ocre. These were left in since as they are common misspellings it is more convenient for the user.

To instantiate: XCDColor named: aString where aString is one of the 261 named colors. If the name is not known, the color red is instantiated. Instances of XKCDColor know their XKCD color name, returned by the name accessor.

Thanks to Randall Monroe of http://xkcd.com for providing the data.
---snip---

And here is a picture of all the colors (Generated with Mondrian :-) )


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: adding 261 named colors

jfabry
If you instantiate a color but dont see it, does it matter that the color is not what you wanted? It's like considering the classical 'tree falls in the forest' question.

Or if you prefer a more implementation-based view: if a morph cannot be drawn, do you halt the system? Right now it is not the case, a rectangle with a cross is drawn.

In any case, I am open to suggestions for improvement!

On 23 Oct 2010, at 18:46, Schwab,Wilhelm K wrote:

> I don't like the idea of instantiating red if the name is not recognized.  Since you don't have selectors (900+ might be a bit much), the compiler/Shout won't catch mistakes, and it will be an ongoing source of silent failures.
>
>
>
>
> ________________________________________
> From: [hidden email] [[hidden email]] On Behalf Of Johan Fabry [[hidden email]]
> Sent: Saturday, October 23, 2010 5:29 PM
> To: Pharo Development
> Subject: [Pharo-project] Proposal: adding 261 named colors
>
> Hi all,
>
> in the work of AspectMaps I was a bit let down by the named colors Pharo provides (Color red et cetera). Now I am happy to say that thanks to the XKCD color survey I was able to improve on this. I can now use 261 named colors thanks to a XKCDColor class, and I'd like to share the code, ideally to be included into Pharo. The code is available in bugreport http://code.google.com/p/pharo/issues/detail?id=3148
>
> Here is the class comment fo XKCDColor:
>
> ---snip---
> A color named according to the XKCD color survey, as published in http://blog.xkcd.com/2010/05/03/color-survey-results/ ("Over five million colors were named across 222,500 user sessions.")
>
> Of the full table of 954 colors that is published only those were selected that did not have a space in their name, ignoring e.g. electric lime, nasty green, macaroni and cheese, pinkish tan, but also light light blue, strong blue. This results in a table of 261 named colors, but with duplicates such as ochre and ocre. These were left in since as they are common misspellings it is more convenient for the user.
>
> To instantiate: XCDColor named: aString where aString is one of the 261 named colors. If the name is not known, the color red is instantiated. Instances of XKCDColor know their XKCD color name, returned by the name accessor.
>
> Thanks to Randall Monroe of http://xkcd.com for providing the data.
> ---snip---
>
> And here is a picture of all the colors (Generated with Mondrian :-) )
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
Johan Fabry  
[hidden email] - http://dcc.uchile.cl/~jfabry
PLEIAD Lab - Computer Science Department (DCC) - University of Chile




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: adding 261 named colors

Stéphane Ducasse
In reply to this post by jfabry
johan

what is the principle?
There was a package on squeaksource or squeak map that adds a lot 512 or so color names.

Stef
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: adding 261 named colors

Stéphane Ducasse
In reply to this post by jfabry
ok I read the code :)

I like 'swamp'

Stef

On Oct 23, 2010, at 11:30 PM, Johan Fabry wrote:

> Hi all,
>
> in the work of AspectMaps I was a bit let down by the named colors Pharo provides (Color red et cetera). Now I am happy to say that thanks to the XKCD color survey I was able to improve on this. I can now use 261 named colors thanks to a XKCDColor class, and I'd like to share the code, ideally to be included into Pharo. The code is available in bugreport http://code.google.com/p/pharo/issues/detail?id=3148 
>
> Here is the class comment fo XKCDColor:
>
> ---snip---
> A color named according to the XKCD color survey, as published in http://blog.xkcd.com/2010/05/03/color-survey-results/ ("Over five million colors were named across 222,500 user sessions.")
>
> Of the full table of 954 colors that is published only those were selected that did not have a space in their name, ignoring e.g. electric lime, nasty green, macaroni and cheese, pinkish tan, but also light light blue, strong blue. This results in a table of 261 named colors, but with duplicates such as ochre and ocre. These were left in since as they are common misspellings it is more convenient for the user.
>
> To instantiate: XCDColor named: aString where aString is one of the 261 named colors. If the name is not known, the color red is instantiated. Instances of XKCDColor know their XKCD color name, returned by the name accessor.
>
> Thanks to Randall Monroe of http://xkcd.com for providing the data.
> ---snip---
>
> And here is a picture of all the colors (Generated with Mondrian :-) )
>
> <Colors.png>
>
> --
> Johan Fabry  
> [hidden email] - http://dcc.uchile.cl/~jfabry
> PLEIAD Lab - Computer Science Department (DCC) - University of Chile
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: adding 261 named colors

Tudor Girba
In reply to this post by jfabry
Hi Johan,

I would definitely be interested in getting this as an external library around Mondrian and Moose.

Cheers,
Doru


On 24 Oct 2010, at 07:09, Johan Fabry wrote:

> If you instantiate a color but dont see it, does it matter that the color is not what you wanted? It's like considering the classical 'tree falls in the forest' question.
>
> Or if you prefer a more implementation-based view: if a morph cannot be drawn, do you halt the system? Right now it is not the case, a rectangle with a cross is drawn.
>
> In any case, I am open to suggestions for improvement!
>
> On 23 Oct 2010, at 18:46, Schwab,Wilhelm K wrote:
>
>> I don't like the idea of instantiating red if the name is not recognized.  Since you don't have selectors (900+ might be a bit much), the compiler/Shout won't catch mistakes, and it will be an ongoing source of silent failures.
>>
>>
>>
>>
>> ________________________________________
>> From: [hidden email] [[hidden email]] On Behalf Of Johan Fabry [[hidden email]]
>> Sent: Saturday, October 23, 2010 5:29 PM
>> To: Pharo Development
>> Subject: [Pharo-project] Proposal: adding 261 named colors
>>
>> Hi all,
>>
>> in the work of AspectMaps I was a bit let down by the named colors Pharo provides (Color red et cetera). Now I am happy to say that thanks to the XKCD color survey I was able to improve on this. I can now use 261 named colors thanks to a XKCDColor class, and I'd like to share the code, ideally to be included into Pharo. The code is available in bugreport http://code.google.com/p/pharo/issues/detail?id=3148
>>
>> Here is the class comment fo XKCDColor:
>>
>> ---snip---
>> A color named according to the XKCD color survey, as published in http://blog.xkcd.com/2010/05/03/color-survey-results/ ("Over five million colors were named across 222,500 user sessions.")
>>
>> Of the full table of 954 colors that is published only those were selected that did not have a space in their name, ignoring e.g. electric lime, nasty green, macaroni and cheese, pinkish tan, but also light light blue, strong blue. This results in a table of 261 named colors, but with duplicates such as ochre and ocre. These were left in since as they are common misspellings it is more convenient for the user.
>>
>> To instantiate: XCDColor named: aString where aString is one of the 261 named colors. If the name is not known, the color red is instantiated. Instances of XKCDColor know their XKCD color name, returned by the name accessor.
>>
>> Thanks to Randall Monroe of http://xkcd.com for providing the data.
>> ---snip---
>>
>> And here is a picture of all the colors (Generated with Mondrian :-) )
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> --
> Johan Fabry  
> [hidden email] - http://dcc.uchile.cl/~jfabry
> PLEIAD Lab - Computer Science Department (DCC) - University of Chile
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
www.tudorgirba.com

"Beauty is where we see it."




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: adding 261 named colors

jfabry

Yes if it doesn't make it in Pharo, it would be great that it gets in Moose.

Stef, you closed the bug, does this mean it will be integrated ?

On 24 Oct 2010, at 04:12, Tudor Girba wrote:

> Hi Johan,
>
> I would definitely be interested in getting this as an external library around Mondrian and Moose.
>
> Cheers,
> Doru
>
>
> On 24 Oct 2010, at 07:09, Johan Fabry wrote:
>
>> If you instantiate a color but dont see it, does it matter that the color is not what you wanted? It's like considering the classical 'tree falls in the forest' question.
>>
>> Or if you prefer a more implementation-based view: if a morph cannot be drawn, do you halt the system? Right now it is not the case, a rectangle with a cross is drawn.
>>
>> In any case, I am open to suggestions for improvement!
>

--
Johan Fabry  
[hidden email] - http://dcc.uchile.cl/~jfabry
PLEIAD Lab - Computer Science Department (DCC) - University of Chile




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: adding 261 named colors

jfabry
In reply to this post by Stéphane Ducasse

Yes there are some fun names in there: ice, yelowish, midnight, barney. Also some very 'human-excreta-related' ones: puke, vomit, poo, booger,  ... But I chose not to pass a watch-out-for-the-children filter. (What would I do with Barney for example ? :-P )

On 24 Oct 2010, at 03:46, Stéphane Ducasse wrote:

> ok I read the code :)
>
> I like 'swamp'
>
> Stef
>
> On Oct 23, 2010, at 11:30 PM, Johan Fabry wrote:
>
>> Hi all,
>>
>> in the work of AspectMaps I was a bit let down by the named colors Pharo provides (Color red et cetera). Now I am happy to say that thanks to the XKCD color survey I was able to improve on this. I can now use 261 named colors thanks to a XKCDColor class, and I'd like to share the code, ideally to be included into Pharo. The code is available in bugreport http://code.google.com/p/pharo/issues/detail?id=3148 
>>
>> Here is the class comment fo XKCDColor:
>>
>> ---snip---
>> A color named according to the XKCD color survey, as published in http://blog.xkcd.com/2010/05/03/color-survey-results/ ("Over five million colors were named across 222,500 user sessions.")
>>
>> Of the full table of 954 colors that is published only those were selected that did not have a space in their name, ignoring e.g. electric lime, nasty green, macaroni and cheese, pinkish tan, but also light light blue, strong blue. This results in a table of 261 named colors, but with duplicates such as ochre and ocre. These were left in since as they are common misspellings it is more convenient for the user.
>>
>> To instantiate: XCDColor named: aString where aString is one of the 261 named colors. If the name is not known, the color red is instantiated. Instances of XKCDColor know their XKCD color name, returned by the name accessor.
>>
>> Thanks to Randall Monroe of http://xkcd.com for providing the data.
>> ---snip---
>>
>> And here is a picture of all the colors (Generated with Mondrian :-) )
>>
>> <Colors.png>
>>
>> --
>> Johan Fabry  
>> [hidden email] - http://dcc.uchile.cl/~jfabry
>> PLEIAD Lab - Computer Science Department (DCC) - University of Chile
>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
Johan Fabry  
[hidden email] - http://dcc.uchile.cl/~jfabry
PLEIAD Lab - Computer Science Department (DCC) - University of Chile




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: adding 261 named colors

Stéphane Ducasse
In reply to this post by Tudor Girba

On Oct 24, 2010, at 7:25 PM, Johan Fabry wrote:

>
> Yes if it doesn't make it in Pharo, it would be great that it gets in Moose.
>
> Stef, you closed the bug, does this mean it will be integrated ?

I did not closed it I marked it as fixed = readyForIntegration
Now this is not clear that we should add it or just keep it as a pharo package.

stef

>
> On 24 Oct 2010, at 04:12, Tudor Girba wrote:
>
>> Hi Johan,
>>
>> I would definitely be interested in getting this as an external library around Mondrian and Moose.
>>
>> Cheers,
>> Doru
>>
>>
>> On 24 Oct 2010, at 07:09, Johan Fabry wrote:
>>
>>> If you instantiate a color but dont see it, does it matter that the color is not what you wanted? It's like considering the classical 'tree falls in the forest' question.
>>>
>>> Or if you prefer a more implementation-based view: if a morph cannot be drawn, do you halt the system? Right now it is not the case, a rectangle with a cross is drawn.
>>>
>>> In any case, I am open to suggestions for improvement!
>>
>
> --
> Johan Fabry  
> [hidden email] - http://dcc.uchile.cl/~jfabry
> PLEIAD Lab - Computer Science Department (DCC) - University of Chile
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: adding 261 named colors

Stéphane Ducasse
In reply to this post by Stéphane Ducasse
I think that this is good to clean it a bit anyway.
Did you have a look at the other package too?
On Oct 24, 2010, at 7:34 PM, Johan Fabry wrote:

>
> Yes there are some fun names in there: ice, yelowish, midnight, barney. Also some very 'human-excreta-related' ones: puke, vomit, poo, booger,  ... But I chose not to pass a watch-out-for-the-children filter. (What would I do with Barney for example ? :-P )
>
> On 24 Oct 2010, at 03:46, Stéphane Ducasse wrote:
>
>> ok I read the code :)
>>
>> I like 'swamp'
>>
>> Stef
>>
>> On Oct 23, 2010, at 11:30 PM, Johan Fabry wrote:
>>
>>> Hi all,
>>>
>>> in the work of AspectMaps I was a bit let down by the named colors Pharo provides (Color red et cetera). Now I am happy to say that thanks to the XKCD color survey I was able to improve on this. I can now use 261 named colors thanks to a XKCDColor class, and I'd like to share the code, ideally to be included into Pharo. The code is available in bugreport http://code.google.com/p/pharo/issues/detail?id=3148 
>>>
>>> Here is the class comment fo XKCDColor:
>>>
>>> ---snip---
>>> A color named according to the XKCD color survey, as published in http://blog.xkcd.com/2010/05/03/color-survey-results/ ("Over five million colors were named across 222,500 user sessions.")
>>>
>>> Of the full table of 954 colors that is published only those were selected that did not have a space in their name, ignoring e.g. electric lime, nasty green, macaroni and cheese, pinkish tan, but also light light blue, strong blue. This results in a table of 261 named colors, but with duplicates such as ochre and ocre. These were left in since as they are common misspellings it is more convenient for the user.
>>>
>>> To instantiate: XCDColor named: aString where aString is one of the 261 named colors. If the name is not known, the color red is instantiated. Instances of XKCDColor know their XKCD color name, returned by the name accessor.
>>>
>>> Thanks to Randall Monroe of http://xkcd.com for providing the data.
>>> ---snip---
>>>
>>> And here is a picture of all the colors (Generated with Mondrian :-) )
>>>
>>> <Colors.png>
>>>
>>> --
>>> Johan Fabry  
>>> [hidden email] - http://dcc.uchile.cl/~jfabry
>>> PLEIAD Lab - Computer Science Department (DCC) - University of Chile
>>>
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> --
> Johan Fabry  
> [hidden email] - http://dcc.uchile.cl/~jfabry
> PLEIAD Lab - Computer Science Department (DCC) - University of Chile
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: adding 261 named colors

Schwab,Wilhelm K
In reply to this post by jfabry
There should be nothing to see - the code should raise and exception if the color is not recognized, and yes, I would probably halt not the system but the view trying to open.  If you really want to default it, then there should be a colorNamed:ifNone: variant to allow the error condition to be trapped.




________________________________________
From: [hidden email] [[hidden email]] On Behalf Of Johan Fabry [[hidden email]]
Sent: Sunday, October 24, 2010 1:09 AM
To: [hidden email]
Subject: Re: [Pharo-project] Proposal: adding 261 named colors

If you instantiate a color but dont see it, does it matter that the color is not what you wanted? It's like considering the classical 'tree falls in the forest' question.

Or if you prefer a more implementation-based view: if a morph cannot be drawn, do you halt the system? Right now it is not the case, a rectangle with a cross is drawn.

In any case, I am open to suggestions for improvement!

On 23 Oct 2010, at 18:46, Schwab,Wilhelm K wrote:

> I don't like the idea of instantiating red if the name is not recognized.  Since you don't have selectors (900+ might be a bit much), the compiler/Shout won't catch mistakes, and it will be an ongoing source of silent failures.
>
>
>
>
> ________________________________________
> From: [hidden email] [[hidden email]] On Behalf Of Johan Fabry [[hidden email]]
> Sent: Saturday, October 23, 2010 5:29 PM
> To: Pharo Development
> Subject: [Pharo-project] Proposal: adding 261 named colors
>
> Hi all,
>
> in the work of AspectMaps I was a bit let down by the named colors Pharo provides (Color red et cetera). Now I am happy to say that thanks to the XKCD color survey I was able to improve on this. I can now use 261 named colors thanks to a XKCDColor class, and I'd like to share the code, ideally to be included into Pharo. The code is available in bugreport http://code.google.com/p/pharo/issues/detail?id=3148
>
> Here is the class comment fo XKCDColor:
>
> ---snip---
> A color named according to the XKCD color survey, as published in http://blog.xkcd.com/2010/05/03/color-survey-results/ ("Over five million colors were named across 222,500 user sessions.")
>
> Of the full table of 954 colors that is published only those were selected that did not have a space in their name, ignoring e.g. electric lime, nasty green, macaroni and cheese, pinkish tan, but also light light blue, strong blue. This results in a table of 261 named colors, but with duplicates such as ochre and ocre. These were left in since as they are common misspellings it is more convenient for the user.
>
> To instantiate: XCDColor named: aString where aString is one of the 261 named colors. If the name is not known, the color red is instantiated. Instances of XKCDColor know their XKCD color name, returned by the name accessor.
>
> Thanks to Randall Monroe of http://xkcd.com for providing the data.
> ---snip---
>
> And here is a picture of all the colors (Generated with Mondrian :-) )
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
Johan Fabry
[hidden email] - http://dcc.uchile.cl/~jfabry
PLEIAD Lab - Computer Science Department (DCC) - University of Chile




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: adding 261 named colors

Alexandre Bergel
In reply to this post by jfabry
Cool!

Alexandre


On 23 Oct 2010, at 18:29, Johan Fabry wrote:

> Hi all,
>
> in the work of AspectMaps I was a bit let down by the named colors Pharo provides (Color red et cetera). Now I am happy to say that thanks to the XKCD color survey I was able to improve on this. I can now use 261 named colors thanks to a XKCDColor class, and I'd like to share the code, ideally to be included into Pharo. The code is available in bugreport http://code.google.com/p/pharo/issues/detail?id=3148 
>
> Here is the class comment fo XKCDColor:
>
> ---snip---
> A color named according to the XKCD color survey, as published in http://blog.xkcd.com/2010/05/03/color-survey-results/ ("Over five million colors were named across 222,500 user sessions.")
>
> Of the full table of 954 colors that is published only those were selected that did not have a space in their name, ignoring e.g. electric lime, nasty green, macaroni and cheese, pinkish tan, but also light light blue, strong blue. This results in a table of 261 named colors, but with duplicates such as ochre and ocre. These were left in since as they are common misspellings it is more convenient for the user.
>
> To instantiate: XCDColor named: aString where aString is one of the 261 named colors. If the name is not known, the color red is instantiated. Instances of XKCDColor know their XKCD color name, returned by the name accessor.
>
> Thanks to Randall Monroe of http://xkcd.com for providing the data.
> ---snip---
>
> And here is a picture of all the colors (Generated with Mondrian :-) )
>
> <Colors.png>
>
> --
> Johan Fabry  
> [hidden email] - http://dcc.uchile.cl/~jfabry
> PLEIAD Lab - Computer Science Department (DCC) - University of Chile
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: adding 261 named colors

jfabry
In reply to this post by Stéphane Ducasse

No I did not find this package, need a bit more precise info ... In any case those colors could be added to the list too if we later recuperate the info.

I propose the integrator has a look at the names and removes the ones deemed inapropriate, it should not be many of them. Please notify me when it is integrated, I would like to notify the xkcd guy, as that is his condition for use of the data.

On 24 Oct 2010, at 17:56, Stéphane Ducasse wrote:

> I think that this is good to clean it a bit anyway.
> Did you have a look at the other package too?
> On Oct 24, 2010, at 7:34 PM, Johan Fabry wrote:
>
>>
>> Yes there are some fun names in there: ice, yelowish, midnight, barney. Also some very 'human-excreta-related' ones: puke, vomit, poo, booger,  ... But I chose not to pass a watch-out-for-the-children filter. (What would I do with Barney for example ? :-P )
>>
>> On 24 Oct 2010, at 03:46, Stéphane Ducasse wrote:
>>
>>> ok I read the code :)
>>>
>>> I like 'swamp'
>>>
>>> Stef

--
Johan Fabry  
[hidden email] - http://dcc.uchile.cl/~jfabry
PLEIAD Lab - Computer Science Department (DCC) - University of Chile




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Proposal: adding 261 named colors

Stéphane Ducasse
In reply to this post by Stéphane Ducasse