[squeak-dev] The Inbox: Graphics-nice.407.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Thu May 16 12:19:16 UTC 2019


Le jeu. 16 mai 2019 à 13:54, Marcel Taeumel <marcel.taeumel at hpi.de> a
écrit :

> Hi Nicolas,
>
> it would be nice to see more named colors in the image. The user-interface
> themes introduce color names for Monokai and Solarized etc. I sneaked some
> crayons into Color itself. I think that "Color crayon blueberry" would be
> acceptable to hide a factory or something similar.
>
> However:
>
> [Color fromString: '#99FFFF'] bench '481,000 per second. 2.08 microseconds
> per run.'
> [Color r: 102/255 g: 1.0 b: 1.0] bench '2,520,000 per second. 397
> nanoseconds per run.'
>
> ;-)
>
> Best,
> Marcel
>

Yes,
I also forgot two conflicts

(Color colorNames reject: [:sym | (Color perform: sym) name = sym])
collect: [:sym | sym -> (Color perform: sym) name].
 {#cantaloupe->#lightOrange . #maraschino->#red}

For having more colorNames, it's better to change ColorName>>#name strategy
first

Am 16.05.2019 13:02:44 schrieb commits at source.squeak.org <
> commits at source.squeak.org>:
> Nicolas Cellier uploaded a new version of Graphics to project The Inbox:
> http://source.squeak.org/inbox/Graphics-nice.407.mcz
>
> ==================== Summary ====================
>
> Name: Graphics-nice.407
> Author: nice
> Time: 16 May 2019, 1:01:07.687487 pm
> UUID: 0c370e95-c3cf-5e44-9eb5-b81fb1ebf424
> Ancestors: Graphics-mt.406
>
> I see that Marcel used something like
> https://gist.github.com/haggen/c91ed87700e5971f6fc6
>
> I propose to reduce crayon shades overlapping by adopting different
> references
>
> blueberry
> (Encycolorpedia) https://encycolorpedia.com/4f86f7
> (Crayola) https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors
> ice (Corel ice blue) https://en.wikipedia.org/wiki/Shades_of_blue#Ice_blue
> lemon
> (Encycolorpedia lemon) https://encycolorpedia.com/fff700
> (Encycolorpedia lemon yellow)
> https://en.wikipedia.org/wiki/Lemon_(color)#Lemon_yellow
> (Crayola lemon) https://en.wikipedia.org/wiki/Shades_of_yellow#Lemon
> licorice (Crayola-Encycolorpedia)
> https://en.wikipedia.org/wiki/Shades_of_black#Licorice
> snow
> (Encycolorpedia) https://encycolorpedia.com/fffafa
> (X11) https://en.wikipedia.org/wiki/Shades_of_white#Snow
> spring (X11 spring green) https://en.wikipedia.org/wiki/Spring_green
> turquoise (X11-Encycolorpedia)
> https://en.wikipedia.org/wiki/Shades_of_cyan#Turquoise
>
> Or should we have sort of factories?
> (Color x11 turquoise vs Color macCrayon turquoise)
>
> Of course, it opens some sort of big can:
> https://encycolorpedia.com/named
> https://en.wikipedia.org/wiki/X11_color_names
> https://en.wikipedia.org/wiki/List_of_colors_(compact)
>
> =============== Diff against Graphics-mt.406 ===============
>
> Item was changed:
> ----- Method: Color class>>blueberry (in category 'named colors -
> crayons') -----
> blueberry
>
> + ^ Color fromString: '#4F86F7'!
> - ^ Color r: 0.0 g: 0.0 b: 1.0!
>
> Item was changed:
> ----- Method: Color class>>ice (in category 'named colors - crayons') -----
> ice
>
> + ^ Color fromString: '#99FFFF'!
> - ^ Color r: 102/255 g: 1.0 b: 1.0!
>
> Item was changed:
> ----- Method: Color class>>lemon (in category 'named colors - crayons')
> -----
> lemon
>
> + ^ Color fromString: '#FFF700'!
> - ^ Color r: 1.0 g: 1.0 b: 0.0!
>
> Item was changed:
> ----- Method: Color class>>licorice (in category 'named colors - crayons')
> -----
> licorice
>
> + ^ Color fromString: '#1A1110'!
> - ^ Color r: 0.0 g: 0.0 b: 0.0!
>
> Item was changed:
> ----- Method: Color class>>snow (in category 'named colors - crayons')
> -----
> snow
>
> + ^ self fromString: '#FFFAFA'!
> - ^ Color r: 1.0 g: 1.0 b: 1.0!
>
> Item was changed:
> ----- Method: Color class>>spring (in category 'named colors - crayons')
> -----
> spring
>
> + ^ self fromString: '#00FF7F'!
> - ^ Color r: 0.0 g: 1.0 b: 0.0!
>
> Item was changed:
> ----- Method: Color class>>turquoise (in category 'named colors -
> crayons') -----
> turquoise
>
> + ^ self fromString: '#40E0D0'!
> - ^ Color r: 0.0 g: 1.0 b: 1.0!
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190516/c17506b7/attachment.html>


More information about the Squeak-dev mailing list