Hi!
The last version of Mondrian contains the class XKCDColor produced by Johan Fabry.
You can try (also accessible from the example menu in a MOEasel/examples/colors:
| cols |
cols := (XKCDColor colormap keys collect: [:cnam | XKCDColor named: cnam]) sortedAs: #hue.
view shape rectangle withoutBorder.
view nodes: cols forEach: [:col |
view shape rectangle
fillColor: col;
width: 65; height: 25.
view node: col.
view shape label text: col name.
view node: col.
view verticalLineLayout].
view gridLayout gapSize: 0
Cheers,
Alexandre
On 3 Nov 2010, at 11:07, Johan Fabry wrote:
> Hi Doru, Alex,
>
> I dont know how this is advancing for Pharo, apparently it is not considered a priority (which I understand of course). So in the mean time you could consider adding it to Mondrian/Moose, as Doru said. The .st file is in attachment, a Mondrian script to produce a reasonably sorted overview of the colors is below. Maybe you will want to do some cleaning/censoring of color names. I personally think that there is no harm here but I have been known to be liberal sometimes :-)
>
> |cols|
> cols := SortedCollection new sortBlock: [:c1 :c2 | (c1 hue) > (c2 hue) ].
> cols addAll: (XKCDColor colormap keys collect: [:cnam | XKCDColor named: cnam]).
> view shape rectangle withoutBorder.
> view nodes: cols
> forEach: [:col | view shape rectangle fillColor: col; width: 65; height: 25. view node: col. view shape: (MORectangleShape new text: col name; withoutBorder). view node: col. view verticalLineLayout].
> view gridLayout gapSize: 0
>
> <XKCDColor.st>
>
> 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
>
> --
> Johan Fabry
>
[hidden email] -
http://dcc.uchile.cl/~jfabry> PLEIAD Lab - Computer Science Department (DCC) - University of Chile
>
>
>
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev