You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>This algorithm returns the name of the color that most closely matches the three numbers specifying a color (RGB).</p>
2
+
<p>This API makes it easier for artists to identify color names so they have a way to use English words to describe colors. </p>
3
+
<pstyle="color: rgb(85, 85, 85);background-color: rgb(255, 255, 255);"><span>This capability I also needed for a finger camera (IoT device) I'm working on which speaks the color name.</span><br></p>
4
+
<h1><spanstyle="color: inherit;"><b>Inputs and Outputs:</b></span><br></h1>
5
+
<p>Colors are defined by 3 integers for RGB (Red Green Blue). <span>The program returns black if any number is larger than the 255 maximum value for each color.</span></p>
6
+
<p>Additional information on colors is available on this author's decades of maniacal obsession with colors on computers at <atarget="_blank" href="http://wilsonmar.com/1colors.htm" style="color: rgb(153, 99, 255);background-color: rgb(255, 255, 255);">http://wilsonmar.com/1colors.htm</a>.<br></p>
<p>"#DEB887" is the hex value used in CSS for display on <b>computer monitors</b>. Such colors may not be available in physical paint from a hardware store.</p>
13
+
<p>"(+1,+0,+2)" is how far away the input color is from the named color returned.</p>
14
+
<h3>Example 2: Pantone<br></h3>
15
+
<pre><b>["123","163","217"]</b></pre>
16
+
<p>is close to one of 1340 colors in the Pantone gamut output:</p>
<p>which is proprietary because of the work that went into figuring out what pigments paint stores need to mix to duplicate it accurately. For a fee, Pantone offers tools pros use to specify and measure a wide number of colors, such as <atarget="_blank" href="https://www.visualnews.com/2016/06/15/worlds-ugliest-color)">"the world's ugliest color"</a> Pantone 448 C at ["74","65",42"]</p>
19
+
<h3>Example 3: Company<br></h3>
20
+
<pre><b>["0","119","181"]</b></pre>
21
+
<p>is close to one of 29 corporate colors the algorithm can output:</p>
<p>The "(+0,+0,+0)" reflects a direct hit.<br></p>
24
+
<h2>Credits:</h2>
25
+
<p>The bulk of the work on this is to reconcile duplicate colors and color names from a variety of sources. </p>
26
+
<ul>
27
+
<li>The X11 and SVG standards were created to name colors that can best be displayed by display monitor hardware with minimal processing (at a time when displays had a smaller gamut than today). </li>
28
+
<li>19 "Metro" colors are defined by Microsoft for Windows 8 from https://www.materialui.co/metrocolors</li>
<li>US Federal Standard 595 from http://www.fed-std-595.com/FS-595-Paint-Spec.html</li>
33
+
</ul>
34
+
<p><span>Thanks to Ayush Pareek for his Python numpy genius.</span><br></p>
35
+
<h2>Future enhancements:</h2>
36
+
<ul>
37
+
<li><pstyle="color: rgb(85, 85, 85);background-color: rgb(255, 255, 255);">Future uses of this API can identify colors that are printable on specific printers. Inclusion of additional color names will make this more useful to specify colors more accurately throughout the design lifecycle.</p></li>
38
+
<li><span>Process JSON from another Algorithmia API as </span><span>part of a toolchain such as a follow-up to identification of predominant colors identified in a photograph by the <ahref="https://github.com/fengsp/color-thief-py" style="color: rgb(153, 99, 255);background-color: rgb(255, 255, 255);">https://github.com/fengsp/color-thief-py</a> library</span></li>
39
+
<listyle="color: rgb(85, 85, 85);background-color: rgb(255, 255, 255);"><span>filter to respond only from specific gamuts (X11, SVG, Pantone)</span></li>
40
+
<li><span>accept a wider range of input formats, such as "(0,175,219)"</span></li>
41
+
<li><span>return a number of colors in the database</span></li>
42
+
<li><span>input and return HCL color numbers (a different API)</span></li>
43
+
<li><span>An app that reports the name of the color at the location tapped on a photo</span></li>
0 commit comments