<div dir="ltr"><div>Hi Marcel,</div><div>I prefer to use a map (Dictionary)</div><div><a href="http://source.squeak.org/inbox/Graphics-nice.408.diff">http://source.squeak.org/inbox/Graphics-nice.408.diff</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 16 mai 2019 à 14:50, Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de">marcel.taeumel@hpi.de</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div id="gmail-m_8247441497562300092__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0)">
                                        Hi Nicolas,<div><br></div><div>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....</div><div><br></div><div>Best,</div><div>Marcel</div><div class="gmail-m_8247441497562300092mb_sig"></div><blockquote class="gmail-m_8247441497562300092history_container" type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px">
                        <p style="color:rgb(170,170,170);margin-top:10px">Am 16.05.2019 14:20:24 schrieb Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 16 mai 2019 à 13:54, Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de" target="_blank">marcel.taeumel@hpi.de</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div id="gmail-m_8247441497562300092gmail-m_-7565630711959311634__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0)">
                                        Hi Nicolas,<div><br></div><div>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.</div><div><br></div><div>However:</div><div><br></div><div><div>[Color fromString: '#99FFFF'] bench '481,000 per second. 2.08 microseconds per run.'</div><div>[Color r: 102/255 g: 1.0 b: 1.0] bench '2,520,000 per second. 397 nanoseconds per run.'</div></div><div><br></div><div>;-)</div><div><br></div><div>Best,</div><div>Marcel</div></div></div></blockquote><div><br></div><div>Yes,<br></div><div>I also forgot two conflicts</div><div><br>(Color colorNames reject: [:sym | (Color perform: sym) name = sym])<br>      collect: [:sym | sym -> (Color perform: sym) name].<br> {#cantaloupe->#lightOrange . #maraschino->#red}</div><div><br></div><div>For having more colorNames, it's better to change ColorName>>#name strategy first<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div id="gmail-m_8247441497562300092gmail-m_-7565630711959311634__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0)"><div class="gmail-m_8247441497562300092gmail-m_-7565630711959311634mb_sig"></div><blockquote class="gmail-m_8247441497562300092gmail-m_-7565630711959311634history_container" type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px">
                        <p style="color:rgb(170,170,170);margin-top:10px">Am 16.05.2019 13:02:44 schrieb <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> <<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif">Nicolas Cellier uploaded a new version of Graphics to project The Inbox:<br><a href="http://source.squeak.org/inbox/Graphics-nice.407.mcz" target="_blank">http://source.squeak.org/inbox/Graphics-nice.407.mcz</a><br><br>==================== Summary ====================<br><br>Name: Graphics-nice.407<br>Author: nice<br>Time: 16 May 2019, 1:01:07.687487 pm<br>UUID: 0c370e95-c3cf-5e44-9eb5-b81fb1ebf424<br>Ancestors: Graphics-mt.406<br><br>I see that Marcel used something like<br><a href="https://gist.github.com/haggen/c91ed87700e5971f6fc6" target="_blank">https://gist.github.com/haggen/c91ed87700e5971f6fc6</a><br><br>I propose to reduce crayon shades overlapping by adopting different references<br><br>blueberry<br> (Encycolorpedia) <a href="https://encycolorpedia.com/4f86f7" target="_blank">https://encycolorpedia.com/4f86f7</a><br>    (Crayola) <a href="https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors" target="_blank">https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors</a><br>ice (Corel ice blue) <a href="https://en.wikipedia.org/wiki/Shades_of_blue#Ice_blue" target="_blank">https://en.wikipedia.org/wiki/Shades_of_blue#Ice_blue</a><br>lemon<br>        (Encycolorpedia lemon) <a href="https://encycolorpedia.com/fff700" target="_blank">https://encycolorpedia.com/fff700</a><br>      (Encycolorpedia lemon yellow) <a href="https://en.wikipedia.org/wiki/Lemon_(color)#Lemon_yellow" target="_blank">https://en.wikipedia.org/wiki/Lemon_(color)#Lemon_yellow</a><br> (Crayola lemon) <a href="https://en.wikipedia.org/wiki/Shades_of_yellow#Lemon" target="_blank">https://en.wikipedia.org/wiki/Shades_of_yellow#Lemon</a><br>licorice (Crayola-Encycolorpedia) <a href="https://en.wikipedia.org/wiki/Shades_of_black#Licorice" target="_blank">https://en.wikipedia.org/wiki/Shades_of_black#Licorice</a><br>snow<br>  (Encycolorpedia) <a href="https://encycolorpedia.com/fffafa" target="_blank">https://encycolorpedia.com/fffafa</a><br>    (X11) <a href="https://en.wikipedia.org/wiki/Shades_of_white#Snow" target="_blank">https://en.wikipedia.org/wiki/Shades_of_white#Snow</a><br>spring (X11 spring green)  <a href="https://en.wikipedia.org/wiki/Spring_green" target="_blank">https://en.wikipedia.org/wiki/Spring_green</a><br>turquoise (X11-Encycolorpedia) <a href="https://en.wikipedia.org/wiki/Shades_of_cyan#Turquoise" target="_blank">https://en.wikipedia.org/wiki/Shades_of_cyan#Turquoise</a><br><br>Or should we have sort of factories?<br>(Color x11 turquoise vs Color macCrayon turquoise)<br><br>Of course, it opens some sort of big can:<br><a href="https://encycolorpedia.com/named" target="_blank">https://encycolorpedia.com/named</a><br><a href="https://en.wikipedia.org/wiki/X11_color_names" target="_blank">https://en.wikipedia.org/wiki/X11_color_names</a><br><a href="https://en.wikipedia.org/wiki/List_of_colors_(compact)" target="_blank">https://en.wikipedia.org/wiki/List_of_colors_(compact)</a><br><br>=============== Diff against Graphics-mt.406 ===============<br><br>Item was changed:<br>  ----- Method: Color class>>blueberry (in category 'named colors - crayons') -----<br>  blueberry<br>  <br>+     ^ Color fromString: '#4F86F7'!<br>-       ^ Color r: 0.0 g: 0.0 b: 1.0!<br><br>Item was changed:<br>  ----- Method: Color class>>ice (in category 'named colors - crayons') -----<br>  ice<br>  <br>+   ^ Color fromString: '#99FFFF'!<br>-       ^ Color r: 102/255 g: 1.0 b: 1.0!<br><br>Item was changed:<br>  ----- Method: Color class>>lemon (in category 'named colors - crayons') -----<br>  lemon<br>  <br>+   ^ Color fromString: '#FFF700'!<br>-       ^ Color r: 1.0 g: 1.0 b: 0.0!<br><br>Item was changed:<br>  ----- Method: Color class>>licorice (in category 'named colors - crayons') -----<br>  licorice<br>  <br>+         ^ Color fromString: '#1A1110'!<br>-       ^ Color r: 0.0 g: 0.0 b: 0.0!<br><br>Item was changed:<br>  ----- Method: Color class>>snow (in category 'named colors - crayons') -----<br>  snow<br>  <br>+         ^ self fromString: '#FFFAFA'!<br>-        ^ Color r: 1.0 g: 1.0 b: 1.0!<br><br>Item was changed:<br>  ----- Method: Color class>>spring (in category 'named colors - crayons') -----<br>  spring<br>  <br>+     ^ self fromString: '#00FF7F'!<br>-        ^ Color r: 0.0 g: 1.0 b: 0.0!<br><br>Item was changed:<br>  ----- Method: Color class>>turquoise (in category 'named colors - crayons') -----<br>  turquoise<br>  <br>+       ^ self fromString: '#40E0D0'!<br>-        ^ Color r: 0.0 g: 1.0 b: 1.0!<br><br><br></div></blockquote>
                                        </div></div><br>
</blockquote></div></div>
</div></blockquote>
                                        </div></div><br>
</blockquote></div>