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

Marcel Taeumel marcel.taeumel at hpi.de
Thu May 16 12:49:51 UTC 2019

Hi Nicolas,

considering the factory approach (e.g., "Color crayon blueberry"), you could easily produce NamedColor (as subclass of Color with a name). Not sure about adding a name directly to Color, though....

Am 16.05.2019 14:20:24 schrieb Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>:

Le jeu. 16 mai 2019 à 13:54, Marcel Taeumel <marcel.taeumel at hpi.de [mailto: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.


[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.'




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 [mailto:commits at source.squeak.org] <commits at source.squeak.org [mailto: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 [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 [https://gist.github.com/haggen/c91ed87700e5971f6fc6]

I propose to reduce crayon shades overlapping by adopting different references

(Encycolorpedia) https://encycolorpedia.com/4f86f7 [https://encycolorpedia.com/4f86f7]
(Crayola) https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors [https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors]
ice (Corel ice blue) https://en.wikipedia.org/wiki/Shades_of_blue#Ice_blue [https://en.wikipedia.org/wiki/Shades_of_blue#Ice_blue]
(Encycolorpedia lemon) https://encycolorpedia.com/fff700 [https://encycolorpedia.com/fff700]
(Encycolorpedia lemon yellow) https://en.wikipedia.org/wiki/Lemon_(color)#Lemon_yellow [https://en.wikipedia.org/wiki/Lemon_(color)#Lemon_yellow]
(Crayola lemon) https://en.wikipedia.org/wiki/Shades_of_yellow#Lemon [https://en.wikipedia.org/wiki/Shades_of_yellow#Lemon]
licorice (Crayola-Encycolorpedia) https://en.wikipedia.org/wiki/Shades_of_black#Licorice [https://en.wikipedia.org/wiki/Shades_of_black#Licorice]
(Encycolorpedia) https://encycolorpedia.com/fffafa [https://encycolorpedia.com/fffafa]
(X11) https://en.wikipedia.org/wiki/Shades_of_white#Snow [https://en.wikipedia.org/wiki/Shades_of_white#Snow]
spring (X11 spring green) https://en.wikipedia.org/wiki/Spring_green [https://en.wikipedia.org/wiki/Spring_green]
turquoise (X11-Encycolorpedia) https://en.wikipedia.org/wiki/Shades_of_cyan#Turquoise [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://encycolorpedia.com/named]
https://en.wikipedia.org/wiki/X11_color_names [https://en.wikipedia.org/wiki/X11_color_names]
https://en.wikipedia.org/wiki/List_of_colors_(compact) [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') -----

+ ^ 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') -----

+ ^ 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') -----

+ ^ 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') -----

+ ^ 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') -----

+ ^ 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') -----

+ ^ 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') -----

+ ^ 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/f50e7f05/attachment.html>

More information about the Squeak-dev mailing list