<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[160132] trunk/Source/WebInspectorUI</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/160132">160132</a></dd>
<dt>Author</dt> <dd>graouts@apple.com</dd>
<dt>Date</dt> <dd>2013-12-04 15:16:59 -0800 (Wed, 04 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: edited color should serialize back to original format when possible
https://bugs.webkit.org/show_bug.cgi?id=125244

Reviewed by Joseph Pecoraro.

Profoundly reworked WebInspector.Color to be more efficient and more flexible when
serializing the color to the various supported formats.

* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
Use new WebInspector.Color.fromString() factory and check for a null return value
rather than an exception to identify invalid color tokens.

* UserInterface/Color.js:
(WebInspector.Color):
Rewrote WebInspector.Color such that it would have, at all times, a canonical
representation in terms of either RGBA or HSLA depending on the format used to
create the color. The new constructor parameters lets the user pass a format
and the RGBA or HSLA components, allowing to bypass the string-only creation
system which was sub-optimal for the new color picker. Additionally, the toString()
method now can provide the most accurate serialization of the color based on the
provided format with a fallback mechanism to RGB/RGBA in cases where the desired
format would incur a loss of fidelity. Finally, simplified the API to only feature
essential features.

(WebInspector.Color.fromString):
New factory method used to create a color from a string.

* UserInterface/ColorPicker.js:
(WebInspector.ColorPicker.prototype.set color):
Keep track of the original color format so that we can use it as the preferred format
when serializing the updated color in _updateColor().

(WebInspector.ColorPicker.prototype._updateColor):
Use the original color format as the prefered formation for color serialization. Also,
use the new WebInspector.Color constructor in lieu of the removed .fromRGBA factory.

(WebInspector.ColorPicker.prototype._updateSliders):
Use the new WebInspector.Color constructor in lieu of the removed .fromRGBA factory.

* UserInterface/ColorWheel.js:
(WebInspector.ColorWheel.prototype._colorAtPointWithBrightness):
Use the new WebInspector.Color constructor in lieu of the removed .fromRGB factory.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceCSSStyleDeclarationTextEditorjs">trunk/Source/WebInspectorUI/UserInterface/CSSStyleDeclarationTextEditor.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceColorjs">trunk/Source/WebInspectorUI/UserInterface/Color.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceColorPickerjs">trunk/Source/WebInspectorUI/UserInterface/ColorPicker.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceColorWheeljs">trunk/Source/WebInspectorUI/UserInterface/ColorWheel.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (160131 => 160132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2013-12-04 23:07:04 UTC (rev 160131)
+++ trunk/Source/WebInspectorUI/ChangeLog        2013-12-04 23:16:59 UTC (rev 160132)
</span><span class="lines">@@ -1,3 +1,49 @@
</span><ins>+2013-12-04  Antoine Quint  &lt;graouts@apple.com&gt;
+
+        Web Inspector: edited color should serialize back to original format when possible
+        https://bugs.webkit.org/show_bug.cgi?id=125244
+
+        Reviewed by Joseph Pecoraro.
+
+        Profoundly reworked WebInspector.Color to be more efficient and more flexible when
+        serializing the color to the various supported formats.
+
+        * UserInterface/CSSStyleDeclarationTextEditor.js:
+        (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
+        Use new WebInspector.Color.fromString() factory and check for a null return value
+        rather than an exception to identify invalid color tokens.
+
+        * UserInterface/Color.js:
+        (WebInspector.Color):
+        Rewrote WebInspector.Color such that it would have, at all times, a canonical
+        representation in terms of either RGBA or HSLA depending on the format used to
+        create the color. The new constructor parameters lets the user pass a format
+        and the RGBA or HSLA components, allowing to bypass the string-only creation
+        system which was sub-optimal for the new color picker. Additionally, the toString()
+        method now can provide the most accurate serialization of the color based on the
+        provided format with a fallback mechanism to RGB/RGBA in cases where the desired
+        format would incur a loss of fidelity. Finally, simplified the API to only feature
+        essential features.
+
+        (WebInspector.Color.fromString):
+        New factory method used to create a color from a string.
+
+        * UserInterface/ColorPicker.js:
+        (WebInspector.ColorPicker.prototype.set color):
+        Keep track of the original color format so that we can use it as the preferred format
+        when serializing the updated color in _updateColor().
+
+        (WebInspector.ColorPicker.prototype._updateColor):
+        Use the original color format as the prefered formation for color serialization. Also,
+        use the new WebInspector.Color constructor in lieu of the removed .fromRGBA factory.
+
+        (WebInspector.ColorPicker.prototype._updateSliders):
+        Use the new WebInspector.Color constructor in lieu of the removed .fromRGBA factory.
+
+        * UserInterface/ColorWheel.js:
+        (WebInspector.ColorWheel.prototype._colorAtPointWithBrightness):
+        Use the new WebInspector.Color constructor in lieu of the removed .fromRGB factory.
+
</ins><span class="cx"> 2013-12-03  Seokju Kwon  &lt;seokju@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Remove '_attachedWindowHeight' property in InspectorFrontendHostStub.js
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceCSSStyleDeclarationTextEditorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/CSSStyleDeclarationTextEditor.js (160131 => 160132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/CSSStyleDeclarationTextEditor.js        2013-12-04 23:07:04 UTC (rev 160131)
+++ trunk/Source/WebInspectorUI/UserInterface/CSSStyleDeclarationTextEditor.js        2013-12-04 23:16:59 UTC (rev 160132)
</span><span class="lines">@@ -426,9 +426,9 @@
</span><span class="cx">                         continue;
</span><span class="cx">                     }
</span><span class="cx"> 
</span><del>-                    try {
-                        var color = new WebInspector.Color(match[0]);
-                    } catch (e) {
</del><ins>+
+                    var color = WebInspector.Color.fromString(match[0]);
+                    if (!color) {
</ins><span class="cx">                         match = colorRegex.exec(lineContent);
</span><span class="cx">                         continue;
</span><span class="cx">                     }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceColorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Color.js (160131 => 160132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Color.js        2013-12-04 23:07:04 UTC (rev 160131)
+++ trunk/Source/WebInspectorUI/UserInterface/Color.js        2013-12-04 23:16:59 UTC (rev 160132)
</span><span class="lines">@@ -27,13 +27,13 @@
</span><span class="cx">  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-/**
- * @constructor
- */
-WebInspector.Color = function(str)
</del><ins>+WebInspector.Color = function(format, components)
</ins><span class="cx"> {
</span><del>-    this.value = str;
-    this._parse();
</del><ins>+    this.format = format;
+    if (format === WebInspector.Color.Format.HSL || format === WebInspector.Color.Format.HSLA)
+        this._hsla = components;
+    else
+        this._rgba = components;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebInspector.Color.Format = {
</span><span class="lines">@@ -47,17 +47,90 @@
</span><span class="cx">     HSLA: &quot;color-format-hsla&quot;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-/**
- * @param {number=} a
- */
-WebInspector.Color.fromRGBA = function(r, g, b, a)
</del><ins>+WebInspector.Color.fromString = function(colorString)
</ins><span class="cx"> {
</span><del>-    return new WebInspector.Color(&quot;rgba(&quot; + r + &quot;,&quot; + g + &quot;,&quot; + b + &quot;,&quot; + (typeof a === &quot;undefined&quot; ? 1 : a) + &quot;)&quot;);
-}
</del><ins>+    var value = colorString.toLowerCase().replace(/%|\s+/g, &quot;&quot;);
+    const transparentNicknames = [&quot;transparent&quot;, &quot;rgba(0,0,0,0)&quot;, &quot;hsla(0,0,0,0)&quot;];
+    if (transparentNicknames.contains(value)) {
+        var color = new WebInspector.Color(WebInspector.Color.Format.Nickname, [0, 0, 0, 0]);
+        color.nickname = &quot;transparent&quot;;
+        color.original = colorString;
+        return color;
+    }
</ins><span class="cx"> 
</span><del>-WebInspector.Color.fromRGB = function(r, g, b)
-{
-    return new WebInspector.Color(&quot;rgb(&quot; + r + &quot;,&quot; + g + &quot;,&quot; + b + &quot;)&quot;);
</del><ins>+    // Simple - #hex, rgb(), nickname, hsl()
+    var simple = /^(?:#([0-9a-f]{3,6})|rgb\(([^)]+)\)|(\w+)|hsl\(([^)]+)\))$/i;
+    var match = colorString.match(simple);
+    if (match) {
+        if (match[1]) { // hex
+            var hex = match[1].toUpperCase();
+            if (hex.length === 3) {
+                return new WebInspector.Color(WebInspector.Color.Format.ShortHEX, [
+                    parseInt(hex.charAt(0) + hex.charAt(0), 16) * 255,
+                    parseInt(hex.charAt(1) + hex.charAt(1), 16) * 255,
+                    parseInt(hex.charAt(2) + hex.charAt(2), 16) * 255,
+                    1
+                ]);
+            } else {
+                return new WebInspector.Color(WebInspector.Color.Format.HEX, [
+                    parseInt(hex.substring(0, 2), 16) * 255,
+                    parseInt(hex.substring(2, 4), 16) * 255,
+                    parseInt(hex.substring(4, 6), 16) * 255,
+                    1
+                ]);
+            }
+        } else if (match[2]) { // rgb
+            var rgb = match[2].split(/\s*,\s*/);
+            return new WebInspector.Color(WebInspector.Color.Format.RGB, [
+                parseInt(rgb[0]),
+                parseInt(rgb[1]),
+                parseInt(rgb[2]),
+                1
+            ]);
+        } else if (match[3]) { // nickname
+            var nickname = match[3].toLowerCase();
+            if (nickname in WebInspector.Color.Nicknames) {
+                var color = new WebInspector.Color(WebInspector.Color.Format.Nickname, WebInspector.Color.Nicknames[nickname].concat(1));
+                color.nickname = nickname;
+                color.original = colorString;
+                return color;
+            } else
+                return null;
+        } else if (match[4]) { // hsl
+            var hsl = match[4].replace(/%/g, &quot;&quot;).split(/\s*,\s*/);
+            return new WebInspector.Color(WebInspector.Color.Format.HSL, [
+                parseInt(hsl[0]),
+                parseInt(hsl[1]),
+                parseInt(hsl[2]),
+                1
+            ]);
+        }
+    }
+
+    // Advanced - rgba(), hsla()
+    var advanced = /^(?:rgba\(([^)]+)\)|hsla\(([^)]+)\))$/;
+    match = colorString.match(advanced);
+    if (match) {
+        if (match[1]) { // rgba
+            var rgba = match[1].split(/\s*,\s*/);
+            return new WebInspector.Color(WebInspector.Color.Format.RGBA, [
+                parseInt(rgba[0]),
+                parseInt(rgba[1]),
+                parseInt(rgba[2]),
+                Number.constrain(parseFloat(rgba[3]), 0, 1)
+            ]);
+        } else if (match[2]) { // hsla
+            var hsla = match[2].replace(/%/g, &quot;&quot;).split(/\s*,\s*/);
+            return new WebInspector.Color(WebInspector.Color.Format.HSLA, [
+                parseInt(hsla[0]),
+                parseInt(hsla[1]),
+                parseInt(hsla[2]),
+                Number.constrain(parseFloat(hsla[3]), 0, 1)
+            ]);
+        }
+    }
+
+    return null;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebInspector.Color.prototype = {
</span><span class="lines">@@ -78,7 +151,7 @@
</span><span class="cx">             if (this.nickname)
</span><span class="cx">                 return WebInspector.Color.Format.Nickname;
</span><span class="cx">             if (this.simple)
</span><del>-                return this.hasShortHex() ? WebInspector.Color.Format.ShortHEX : WebInspector.Color.Format.HEX;
</del><ins>+                return this._canBeSerializedAsShortHEX() ? WebInspector.Color.Format.ShortHEX : WebInspector.Color.Format.HEX;
</ins><span class="cx">             else
</span><span class="cx">                 return WebInspector.Color.Format.Original;
</span><span class="cx"> 
</span><span class="lines">@@ -90,7 +163,7 @@
</span><span class="cx"> 
</span><span class="cx">         case WebInspector.Color.Format.Nickname:
</span><span class="cx">             if (this.simple)
</span><del>-                return this.hasShortHex() ? WebInspector.Color.Format.ShortHEX : WebInspector.Color.Format.HEX;
</del><ins>+                return this._canBeSerializedAsShortHEX() ? WebInspector.Color.Format.ShortHEX : WebInspector.Color.Format.HEX;
</ins><span class="cx">             else
</span><span class="cx">                 return WebInspector.Color.Format.Original;
</span><span class="cx"> 
</span><span class="lines">@@ -100,277 +173,193 @@
</span><span class="cx">         }
</span><span class="cx">     },
</span><span class="cx"> 
</span><del>-    /**
-     * @return {string}
-     */
-    get shorthex()
</del><ins>+    get alpha()
</ins><span class="cx">     {
</span><del>-        if (&quot;_short&quot; in this)
-            return this._short;
</del><ins>+        return this._rgba ? this._rgba[3] : this._hsla[3];
+    },
</ins><span class="cx"> 
</span><del>-        if (!this.simple)
-            return &quot;&quot;;
</del><ins>+    get simple()
+    {
+        return this.alpha === 1;
+    },
</ins><span class="cx"> 
</span><del>-        var hex = this.hex;
-        if (hex.charAt(0) === hex.charAt(1) &amp;&amp; hex.charAt(2) === hex.charAt(3) &amp;&amp; hex.charAt(4) === hex.charAt(5))
-            this._short = hex.charAt(0) + hex.charAt(2) + hex.charAt(4);
-        else
-            this._short = hex;
-
-        return this._short;
</del><ins>+    get rgb()
+    {
+        var rgb = this.rgba.slice();
+        rgb.pop();
+        return rgb;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    /**
-     * @return {string}
-     */
-    get hex()
</del><ins>+    get hsl()
</ins><span class="cx">     {
</span><del>-        if (!this.simple)
-            return &quot;&quot;;
</del><ins>+        var hsl = this.hsla.slice();
+        hsl.pop();
+        return hsl;
+    },
</ins><span class="cx"> 
</span><del>-        return this._hex;
</del><ins>+    get rgba()
+    {
+        if (!this._rgba)
+            this._rgba = this._hslaToRGBA(this._hsla);
+        return this._rgba;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    set hex(x)
</del><ins>+    get hsla()
</ins><span class="cx">     {
</span><del>-        this._hex = x;
</del><ins>+        if (!this._hsla)
+            this._hsla = this._rgbaToHSLA(this.rgba);
+        return this._hsla;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    /**
-     * @return {Array.&lt;number&gt;}
-     */
-    get rgb()
</del><ins>+    toString: function(format)
</ins><span class="cx">     {
</span><del>-        if (this._rgb)
-            return this._rgb;
</del><ins>+        if (!format)
+            format = this.format;
</ins><span class="cx"> 
</span><del>-        if (this.simple)
-            this._rgb = this._hexToRGB(this.hex);
-        else {
-            var rgba = this.rgba;
-            this._rgb = [rgba[0], rgba[1], rgba[2]];
</del><ins>+        switch (format) {
+        case WebInspector.Color.Format.Original:
+            return this._toOriginalString();
+        case WebInspector.Color.Format.RGB:
+            return this._toRGBString();
+        case WebInspector.Color.Format.RGBA:
+            return this._toRGBAString();
+        case WebInspector.Color.Format.HSL:
+            return this._toHSLString();
+        case WebInspector.Color.Format.HSLA:
+            return this._toHSLAString();
+        case WebInspector.Color.Format.HEX:
+            return this._toHEXString();
+        case WebInspector.Color.Format.ShortHEX:
+            return this._toShortHEXString();
+        case WebInspector.Color.Format.Nickname:
+            return this._toNicknameString();
</ins><span class="cx">         }
</span><span class="cx"> 
</span><del>-        return this._rgb;
</del><ins>+        throw &quot;invalid color format&quot;;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    set rgb(x)
</del><ins>+    _toOriginalString: function()
</ins><span class="cx">     {
</span><del>-        this._rgb = x;
</del><ins>+        return this.original || this._toNicknameString();
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    /**
-     * @return {Array.&lt;number&gt;}
-     */
-    get hsl()
</del><ins>+    _toNicknameString: function()
</ins><span class="cx">     {
</span><del>-        if (this._hsl)
-            return this._hsl;
</del><ins>+        if (this.nickname)
+            return this.nickname;
</ins><span class="cx"> 
</span><del>-        this._hsl = this._rgbToHSL(this.rgb);
-        return this._hsl;
-    },
</del><ins>+        var rgba = this.rgba;
+        if (!this.simple) {
+            if (rgba[0] === 0 &amp;&amp; rgba[1] === 0 &amp;&amp; rgba[2] === 0 &amp;&amp; rgba[3] === 0)
+                return &quot;transparent&quot;;
+            return this._toRGBAString();
+        }
</ins><span class="cx"> 
</span><del>-    set hsl(x)
-    {
-        this._hsl = x;
</del><ins>+        var nicknames = WebInspector.Color.Nicknames;
+        for (var nickname in nicknames) {
+            var nicknameRGB = nicknames[nickname];
+            if (nicknameRGB[0] === rgba[0] &amp;&amp; nicknameRGB[1] === rgba[1] &amp;&amp; nicknameRGB[2] === rgba[2])
+                return nickname;
+        }
+
+        return this._toRGBString();
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    /**
-     * @return {string}
-     */
-    get nickname()
</del><ins>+    _toShortHEXString: function()
</ins><span class="cx">     {
</span><del>-        if (typeof this._nickname !== &quot;undefined&quot;) // would be set on parse if there was a nickname
-            return this._nickname;
</del><ins>+        if (!this.simple)
+            return this._toRGBAString();
+
+        var rgba = this.rgba;
+        var r = this._componentToHexValue(rgba[0]);
+        var g = this._componentToHexValue(rgba[1]);
+        var b = this._componentToHexValue(rgba[2]);
+
+        if (r[0] === r[1] &amp;&amp; g[0] === g[1] &amp;&amp; b[0] === b[1])
+            return &quot;#&quot; + r[0] + g[0] + b[0];
</ins><span class="cx">         else
</span><del>-            return &quot;&quot;;
</del><ins>+            return &quot;#&quot; + r + g + b;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    set nickname(x)
</del><ins>+    _toHEXString: function()
</ins><span class="cx">     {
</span><del>-        this._nickname = x;
-    },
</del><ins>+        if (!this.simple)
+            return this._toRGBAString();
</ins><span class="cx"> 
</span><del>-    /**
-     * @return {Array.&lt;number&gt;}
-     */
-    get rgba()
-    {
-        return this._rgba;
</del><ins>+        var rgba = this.rgba;
+        var r = this._componentToHexValue(rgba[0]);
+        var g = this._componentToHexValue(rgba[1]);
+        var b = this._componentToHexValue(rgba[2]);
+
+        return &quot;#&quot; + r + g + b;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    set rgba(x)
</del><ins>+    _toRGBString: function()
</ins><span class="cx">     {
</span><del>-        this._rgba = x;
</del><ins>+        if (!this.simple)
+            return this._toRGBAString();
+
+        var rgba = this.rgba;
+        return &quot;rgb(&quot; + [rgba[0], rgba[1], rgba[2]].join(&quot;, &quot;) + &quot;)&quot;;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    /**
-     * @return {Array.&lt;number&gt;}
-     */
-    get hsla()
</del><ins>+    _toRGBAString: function()
</ins><span class="cx">     {
</span><del>-        return this._hsla;
</del><ins>+        return &quot;rgba(&quot; + this.rgba.join(&quot;, &quot;) + &quot;)&quot;;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    set hsla(x)
</del><ins>+    _toHSLString: function()
</ins><span class="cx">     {
</span><del>-        this._hsla = x;
</del><ins>+        if (!this.simple)
+            return this._toHSLAString();
+
+        var hsla = this.hsla;
+        return &quot;hsl(&quot; + hsla[0] + &quot;, &quot; + hsla[1] + &quot;%, &quot; + hsla[2] + &quot;%)&quot;;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    /**
-     * @return {boolean}
-     */
-    hasShortHex: function()
</del><ins>+    _toHSLAString: function()
</ins><span class="cx">     {
</span><del>-        var shorthex = this.shorthex;
-        return (!!shorthex &amp;&amp; shorthex.length === 3);
</del><ins>+        var hsla = this.hsla;
+        return &quot;hsla(&quot; + hsla[0] + &quot;, &quot; + hsla[1] + &quot;%, &quot; + hsla[2] + &quot;%, &quot; + hsla[3] + &quot;)&quot;;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    /**
-     * @return {string}
-     */
-    toString: function(format)
</del><ins>+    _canBeSerializedAsShortHEX: function()
</ins><span class="cx">     {
</span><del>-        if (!format)
-            format = this.format;
</del><ins>+        var rgba = this.rgba;
</ins><span class="cx"> 
</span><del>-        switch (format) {
-            case WebInspector.Color.Format.Original:
-                return this.value;
-            case WebInspector.Color.Format.RGB:
-                return &quot;rgb(&quot; + this.rgb.join(&quot;, &quot;) + &quot;)&quot;;
-            case WebInspector.Color.Format.RGBA:
-                return &quot;rgba(&quot; + (this.rgba ? this.rgba : this.rgb.concat(1)).join(&quot;, &quot;) + &quot;)&quot;;
-            case WebInspector.Color.Format.HSL:
-                var hsl = this.hsl;
-                return &quot;hsl(&quot; + hsl[0] + &quot;, &quot; + hsl[1] + &quot;%, &quot; + hsl[2] + &quot;%)&quot;;
-            case WebInspector.Color.Format.HSLA:
-                var hsla = this.hsla;
-                if (!hsla)
-                    return &quot;hsla(&quot; + hsl[0] + &quot;, &quot; + hsl[1] + &quot;%, &quot; + hsl[2] + &quot;%, 1)&quot;;
-                return &quot;hsla(&quot; + hsla[0] + &quot;, &quot; + hsla[1] + &quot;%, &quot; + hsla[2] + &quot;%, &quot; + hsla[3] + &quot;)&quot;;
-            case WebInspector.Color.Format.HEX:
-                return &quot;#&quot; + this.hex;
-            case WebInspector.Color.Format.ShortHEX:
-                return &quot;#&quot; + this.shorthex;
-            case WebInspector.Color.Format.Nickname:
-                return this.nickname;
-        }
</del><ins>+        var r = this._componentToHexValue(rgba[0]);
+        if (r[0] !== r[1])
+            return false;
</ins><span class="cx"> 
</span><del>-        throw &quot;invalid color format&quot;;
-    },
</del><ins>+        var g = this._componentToHexValue(rgba[1]);
+        if (g[0] !== g[1])
+            return false;
</ins><span class="cx"> 
</span><del>-    /**
-     * @return {Object}
-     */
-    toProtocolRGBA: function()
-    {
-        if (this._protocolRGBA)
-            return this._protocolRGBA;
</del><ins>+        var b = this._componentToHexValue(rgba[2]);
+        if (b[0] !== b[1])
+            return false;
</ins><span class="cx"> 
</span><del>-        var components = this.rgba;
-        if (components)
-            this._protocolRGBA = { r: Number(components[0]), g: Number(components[1]), b: Number(components[2]), a: Number(components[3]) };
-        else {
-            components = this.rgb;
-            this._protocolRGBA = { r: Number(components[0]), g: Number(components[1]), b: Number(components[2]) };
-        }
-        return this._protocolRGBA;
</del><ins>+        return true;
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    /**
-     * @param {number} value
-     * @param {number} min
-     * @param {number} max
-     * @return {number}
-     */
-    _clamp: function(value, min, max)
</del><ins>+    _componentToNumber: function(value)
</ins><span class="cx">     {
</span><del>-        if (value &lt; min)
-            return min;
-        if (value &gt; max)
-            return max;
-        return value;
</del><ins>+        return Number.constrain(value, 0, 255);
</ins><span class="cx">     },
</span><span class="cx"> 
</span><del>-    /**
-     * @param {number|string} rgbValue
-     * @return {number}
-     */
-    _individualRGBValueToFloatValue: function(rgbValue)
</del><ins>+    _componentToHexValue: function(value)
</ins><span class="cx">     {
</span><del>-        if (typeof rgbValue === &quot;number&quot;)
-            return this._clamp(rgbValue, 0, 255);
-
-        if (rgbValue.indexOf(&quot;%&quot;) === -1) {
-            var intValue = parseInt(rgbValue, 10);
-            return this._clamp(intValue, 0, 255);
-        }
-
-        var percentValue = parseFloat(rgbValue);
-        return this._clamp(percentValue, 0, 100) * 2.55;
-    },
-
-    /**
-     * @param {number|string} rgbValue
-     * @return {string}
-     */
-    _individualRGBValueToHexValue: function(rgbValue)
-    {
-        var floatValue = this._individualRGBValueToFloatValue(rgbValue);
-        var hex = Math.round(floatValue).toString(16);
</del><ins>+        var hex = this._componentToNumber(value).toString(16);
</ins><span class="cx">         if (hex.length === 1)
</span><span class="cx">             hex = &quot;0&quot; + hex;
</span><span class="cx">         return hex;
</span><span class="cx">     },
</span><span class="cx"> 
</span><del>-    /**
-     * @param {Array.&lt;string&gt;} rgb
-     * @return {string}
-     */
-    _rgbStringsToHex: function(rgb)
-    {
-        var r = this._individualRGBValueToHexValue(rgb[0]);
-        var g = this._individualRGBValueToHexValue(rgb[1]);
-        var b = this._individualRGBValueToHexValue(rgb[2]);
-        return (r + g + b).toUpperCase();
-    },
-
-    /**
-     * @param {Array.&lt;number&gt;} rgb
-     * @return {string}
-     */
-    _rgbToHex: function(rgb)
-    {
-        var r = this._individualRGBValueToHexValue(rgb[0]);
-        var g = this._individualRGBValueToHexValue(rgb[1]);
-        var b = this._individualRGBValueToHexValue(rgb[2]);
-        return (r + g + b).toUpperCase();
-    },
-
-    /**
-     * @param {string} hex
-     * @return {Array.&lt;number&gt;}
-     */
-    _hexToRGB: function(hex)
-    {
-        var r = parseInt(hex.substring(0,2), 16);
-        var g = parseInt(hex.substring(2,4), 16);
-        var b = parseInt(hex.substring(4,6), 16);
-
-        return [r, g, b];
-    },
-
-    /**
-     * @param {Array.&lt;string|number&gt;} rgb
-     * @return {Array.&lt;number&gt;}
-     */
</del><span class="cx">     _rgbToHSL: function(rgb)
</span><span class="cx">     {
</span><del>-        var r = this._individualRGBValueToFloatValue(rgb[0]) / 255;
-        var g = this._individualRGBValueToFloatValue(rgb[1]) / 255;
-        var b = this._individualRGBValueToFloatValue(rgb[2]) / 255;
</del><ins>+        var r = this._componentToNumber(rgb[0]) / 255;
+        var g = this._componentToNumber(rgb[1]) / 255;
+        var b = this._componentToNumber(rgb[2]) / 255;
</ins><span class="cx">         var max = Math.max(r, g, b);
</span><span class="cx">         var min = Math.min(r, g, b);
</span><span class="cx">         var diff = max - min;
</span><span class="lines">@@ -397,16 +386,12 @@
</span><span class="cx">             var s = diff / (2 - add);
</span><span class="cx"> 
</span><span class="cx">         h = Math.round(h);
</span><del>-        s = Math.round(s*100);
-        l = Math.round(l*100);
</del><ins>+        s = Math.round(s * 100);
+        l = Math.round(l * 100);
</ins><span class="cx"> 
</span><span class="cx">         return [h, s, l];
</span><span class="cx">     },
</span><span class="cx"> 
</span><del>-    /**
-     * @param {Array.&lt;number&gt;} hsl
-     * @return {Array.&lt;number&gt;}
-     */
</del><span class="cx">     _hslToRGB: function(hsl)
</span><span class="cx">     {
</span><span class="cx">         var h = parseFloat(hsl[0]) / 360;
</span><span class="lines">@@ -429,409 +414,162 @@
</span><span class="cx">         ];
</span><span class="cx">     },
</span><span class="cx"> 
</span><del>-    /**
-     * @param {Array.&lt;number&gt;} rgba
-     * @return {Array.&lt;number&gt;}
-     */
-    _rgbaToHSLA: function(rgba, alpha)
</del><ins>+    _rgbaToHSLA: function(rgba)
</ins><span class="cx">     {
</span><span class="cx">         var hsl = this._rgbToHSL(rgba);
</span><del>-        hsl.push(alpha);
</del><ins>+        hsl.push(rgba[3]);
</ins><span class="cx">         return hsl;
</span><span class="cx">     },
</span><span class="cx"> 
</span><del>-    /**
-     * @param {Array.&lt;number&gt;} hsla
-     * @param {number} alpha
-     * @return {Array.&lt;number&gt;}
-     */
-    _hslaToRGBA: function(hsla, alpha)
</del><ins>+    _hslaToRGBA: function(hsla)
</ins><span class="cx">     {
</span><del>-        var rgb = this._hslToRGB(hsla);
-        rgb.push(alpha);
-        return rgb;
-    },
-
-    _parse: function()
-    {
-        // Special Values - Advanced but Must Be Parsed First - transparent
-        var value = this.value.toLowerCase().replace(/%|\s+/g, &quot;&quot;);
-        if (value in WebInspector.Color.AdvancedNickNames) {
-            this.format = WebInspector.Color.Format.Nickname;
-            var set = WebInspector.Color.AdvancedNickNames[value];
-            this.simple = false;
-            this.rgba = set[0];
-            this.hsla = set[1];
-            this.nickname = set[2];
-            this.alpha = set[0][3];
-            return;
-        }
-
-        // Simple - #hex, rgb(), nickname, hsl()
-        var simple = /^(?:#([0-9a-f]{3,6})|rgb\(([^)]+)\)|(\w+)|hsl\(([^)]+)\))$/i;
-        var match = this.value.match(simple);
-        if (match) {
-            this.simple = true;
-
-            if (match[1]) { // hex
-                var hex = match[1].toUpperCase();
-                if (hex.length === 3) {
-                    this.format = WebInspector.Color.Format.ShortHEX;
-                    this.hex = hex.charAt(0) + hex.charAt(0) + hex.charAt(1) + hex.charAt(1) + hex.charAt(2) + hex.charAt(2);
-                } else {
-                    this.format = WebInspector.Color.Format.HEX;
-                    this.hex = hex;
-                }
-            } else if (match[2]) { // rgb
-                this.format = WebInspector.Color.Format.RGB;
-                var rgb = match[2].split(/\s*,\s*/);
-                this.rgb = rgb;
-                this.hex = this._rgbStringsToHex(rgb);
-            } else if (match[3]) { // nickname
-                var nickname = match[3].toLowerCase();
-                if (nickname in WebInspector.Color.Nicknames) {
-                    this.format = WebInspector.Color.Format.Nickname;
-                    this.hex = WebInspector.Color.Nicknames[nickname];
-                } else // unknown name
-                    throw &quot;unknown color name&quot;;
-            } else if (match[4]) { // hsl
-                this.format = WebInspector.Color.Format.HSL;
-                var hsl = match[4].replace(/%/g, &quot;&quot;).split(/\s*,\s*/);
-                this.hsl = hsl;
-                this.rgb = this._hslToRGB(hsl);
-                this.hex = this._rgbToHex(this.rgb);
-            }
-
-            // Fill in the values if this is a known hex color
-            var hex = this.hex;
-            if (hex &amp;&amp; hex in WebInspector.Color.HexTable) {
-                var set = WebInspector.Color.HexTable[hex];
-                this.rgb = set[0];
-                this.hsl = set[1];
-                this.nickname = set[2];
-            }
-
-            return;
-        }
-
-        // Advanced - rgba(), hsla()
-        var advanced = /^(?:rgba\(([^)]+)\)|hsla\(([^)]+)\))$/;
-        match = this.value.match(advanced);
-        if (match) {
-            this.simple = false;
-            if (match[1]) { // rgba
-                this.format = WebInspector.Color.Format.RGBA;
-                this.rgba = match[1].split(/\s*,\s*/);
-                this.rgba[3] = this.alpha = this._clamp(this.rgba[3], 0, 1);
-                this.hsla = this._rgbaToHSLA(this.rgba, this.alpha);
-            } else if (match[2]) { // hsla
-                this.format = WebInspector.Color.Format.HSLA;
-                this.hsla = match[2].replace(/%/g, &quot;&quot;).split(/\s*,\s*/);
-                this.hsla[3] = this.alpha = this._clamp(this.hsla[3], 0, 1);
-                this.rgba = this._hslaToRGBA(this.hsla, this.alpha);
-            }
-
-            return;
-        }
-
-        // Could not parse as a valid color
-        throw &quot;could not parse color&quot;;
</del><ins>+        var rgba = this._hslToRGB(hsla);
+        rgba.push(hsla[3]);
+        return rgba;
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// Simple Values: [rgb, hsl, nickname]
-WebInspector.Color.HexTable = {
-    &quot;000000&quot;: [[0, 0, 0], [0, 0, 0], &quot;black&quot;],
-    &quot;000080&quot;: [[0, 0, 128], [240, 100, 25], &quot;navy&quot;],
-    &quot;00008B&quot;: [[0, 0, 139], [240, 100, 27], &quot;darkBlue&quot;],
-    &quot;0000CD&quot;: [[0, 0, 205], [240, 100, 40], &quot;mediumBlue&quot;],
-    &quot;0000FF&quot;: [[0, 0, 255], [240, 100, 50], &quot;blue&quot;],
-    &quot;006400&quot;: [[0, 100, 0], [120, 100, 20], &quot;darkGreen&quot;],
-    &quot;008000&quot;: [[0, 128, 0], [120, 100, 25], &quot;green&quot;],
-    &quot;008080&quot;: [[0, 128, 128], [180, 100, 25], &quot;teal&quot;],
-    &quot;008B8B&quot;: [[0, 139, 139], [180, 100, 27], &quot;darkCyan&quot;],
-    &quot;00BFFF&quot;: [[0, 191, 255], [195, 100, 50], &quot;deepSkyBlue&quot;],
-    &quot;00CED1&quot;: [[0, 206, 209], [181, 100, 41], &quot;darkTurquoise&quot;],
-    &quot;00FA9A&quot;: [[0, 250, 154], [157, 100, 49], &quot;mediumSpringGreen&quot;],
-    &quot;00FF00&quot;: [[0, 255, 0], [120, 100, 50], &quot;lime&quot;],
-    &quot;00FF7F&quot;: [[0, 255, 127], [150, 100, 50], &quot;springGreen&quot;],
-    &quot;00FFFF&quot;: [[0, 255, 255], [180, 100, 50], &quot;cyan&quot;],
-    &quot;191970&quot;: [[25, 25, 112], [240, 64, 27], &quot;midnightBlue&quot;],
-    &quot;1E90FF&quot;: [[30, 144, 255], [210, 100, 56], &quot;dodgerBlue&quot;],
-    &quot;20B2AA&quot;: [[32, 178, 170], [177, 70, 41], &quot;lightSeaGreen&quot;],
-    &quot;228B22&quot;: [[34, 139, 34], [120, 61, 34], &quot;forestGreen&quot;],
-    &quot;2E8B57&quot;: [[46, 139, 87], [146, 50, 36], &quot;seaGreen&quot;],
-    &quot;2F4F4F&quot;: [[47, 79, 79], [180, 25, 25], &quot;darkSlateGray&quot;],
-    &quot;32CD32&quot;: [[50, 205, 50], [120, 61, 50], &quot;limeGreen&quot;],
-    &quot;3CB371&quot;: [[60, 179, 113], [147, 50, 47], &quot;mediumSeaGreen&quot;],
-    &quot;40E0D0&quot;: [[64, 224, 208], [174, 72, 56], &quot;turquoise&quot;],
-    &quot;4169E1&quot;: [[65, 105, 225], [225, 73, 57], &quot;royalBlue&quot;],
-    &quot;4682B4&quot;: [[70, 130, 180], [207, 44, 49], &quot;steelBlue&quot;],
-    &quot;483D8B&quot;: [[72, 61, 139], [248, 39, 39], &quot;darkSlateBlue&quot;],
-    &quot;48D1CC&quot;: [[72, 209, 204], [178, 60, 55], &quot;mediumTurquoise&quot;],
-    &quot;4B0082&quot;: [[75, 0, 130], [275, 100, 25], &quot;indigo&quot;],
-    &quot;556B2F&quot;: [[85, 107, 47], [82, 39, 30], &quot;darkOliveGreen&quot;],
-    &quot;5F9EA0&quot;: [[95, 158, 160], [182, 25, 50], &quot;cadetBlue&quot;],
-    &quot;6495ED&quot;: [[100, 149, 237], [219, 79, 66], &quot;cornflowerBlue&quot;],
-    &quot;66CDAA&quot;: [[102, 205, 170], [160, 51, 60], &quot;mediumAquaMarine&quot;],
-    &quot;696969&quot;: [[105, 105, 105], [0, 0, 41], &quot;dimGray&quot;],
-    &quot;6A5ACD&quot;: [[106, 90, 205], [248, 53, 58], &quot;slateBlue&quot;],
-    &quot;6B8E23&quot;: [[107, 142, 35], [80, 60, 35], &quot;oliveDrab&quot;],
-    &quot;708090&quot;: [[112, 128, 144], [210, 13, 50], &quot;slateGray&quot;],
-    &quot;778899&quot;: [[119, 136, 153], [210, 14, 53], &quot;lightSlateGray&quot;],
-    &quot;7B68EE&quot;: [[123, 104, 238], [249, 80, 67], &quot;mediumSlateBlue&quot;],
-    &quot;7CFC00&quot;: [[124, 252, 0], [90, 100, 49], &quot;lawnGreen&quot;],
-    &quot;7FFF00&quot;: [[127, 255, 0], [90, 100, 50], &quot;chartreuse&quot;],
-    &quot;7FFFD4&quot;: [[127, 255, 212], [160, 100, 75], &quot;aquamarine&quot;],
-    &quot;800000&quot;: [[128, 0, 0], [0, 100, 25], &quot;maroon&quot;],
-    &quot;800080&quot;: [[128, 0, 128], [300, 100, 25], &quot;purple&quot;],
-    &quot;808000&quot;: [[128, 128, 0], [60, 100, 25], &quot;olive&quot;],
-    &quot;808080&quot;: [[128, 128, 128], [0, 0, 50], &quot;gray&quot;],
-    &quot;87CEEB&quot;: [[135, 206, 235], [197, 71, 73], &quot;skyBlue&quot;],
-    &quot;87CEFA&quot;: [[135, 206, 250], [203, 92, 75], &quot;lightSkyBlue&quot;],
-    &quot;8A2BE2&quot;: [[138, 43, 226], [271, 76, 53], &quot;blueViolet&quot;],
-    &quot;8B0000&quot;: [[139, 0, 0], [0, 100, 27], &quot;darkRed&quot;],
-    &quot;8B008B&quot;: [[139, 0, 139], [300, 100, 27], &quot;darkMagenta&quot;],
-    &quot;8B4513&quot;: [[139, 69, 19], [25, 76, 31], &quot;saddleBrown&quot;],
-    &quot;8FBC8F&quot;: [[143, 188, 143], [120, 25, 65], &quot;darkSeaGreen&quot;],
-    &quot;90EE90&quot;: [[144, 238, 144], [120, 73, 75], &quot;lightGreen&quot;],
-    &quot;9370D8&quot;: [[147, 112, 219], [260, 60, 65], &quot;mediumPurple&quot;],
-    &quot;9400D3&quot;: [[148, 0, 211], [282, 100, 41], &quot;darkViolet&quot;],
-    &quot;98FB98&quot;: [[152, 251, 152], [120, 93, 79], &quot;paleGreen&quot;],
-    &quot;9932CC&quot;: [[153, 50, 204], [280, 61, 50], &quot;darkOrchid&quot;],
-    &quot;9ACD32&quot;: [[154, 205, 50], [80, 61, 50], &quot;yellowGreen&quot;],
-    &quot;A0522D&quot;: [[160, 82, 45], [19, 56, 40], &quot;sienna&quot;],
-    &quot;A52A2A&quot;: [[165, 42, 42], [0, 59, 41], &quot;brown&quot;],
-    &quot;A9A9A9&quot;: [[169, 169, 169], [0, 0, 66], &quot;darkGray&quot;],
-    &quot;ADD8E6&quot;: [[173, 216, 230], [195, 53, 79], &quot;lightBlue&quot;],
-    &quot;ADFF2F&quot;: [[173, 255, 47], [84, 100, 59], &quot;greenYellow&quot;],
-    &quot;AFEEEE&quot;: [[175, 238, 238], [180, 65, 81], &quot;paleTurquoise&quot;],
-    &quot;B0C4DE&quot;: [[176, 196, 222], [214, 41, 78], &quot;lightSteelBlue&quot;],
-    &quot;B0E0E6&quot;: [[176, 224, 230], [187, 52, 80], &quot;powderBlue&quot;],
-    &quot;B22222&quot;: [[178, 34, 34], [0, 68, 42], &quot;fireBrick&quot;],
-    &quot;B8860B&quot;: [[184, 134, 11], [43, 89, 38], &quot;darkGoldenrod&quot;],
-    &quot;BA55D3&quot;: [[186, 85, 211], [288, 59, 58], &quot;mediumOrchid&quot;],
-    &quot;BC8F8F&quot;: [[188, 143, 143], [0, 25, 65], &quot;rosyBrown&quot;],
-    &quot;BDB76B&quot;: [[189, 183, 107], [56, 38, 58], &quot;darkKhaki&quot;],
-    &quot;C0C0C0&quot;: [[192, 192, 192], [0, 0, 75], &quot;silver&quot;],
-    &quot;C71585&quot;: [[199, 21, 133], [322, 81, 43], &quot;mediumVioletRed&quot;],
-    &quot;CD5C5C&quot;: [[205, 92, 92], [0, 53, 58], &quot;indianRed&quot;],
-    &quot;CD853F&quot;: [[205, 133, 63], [30, 59, 53], &quot;peru&quot;],
-    &quot;D2691E&quot;: [[210, 105, 30], [25, 75, 47], &quot;chocolate&quot;],
-    &quot;D2B48C&quot;: [[210, 180, 140], [34, 44, 69], &quot;tan&quot;],
-    &quot;D3D3D3&quot;: [[211, 211, 211], [0, 0, 83], &quot;lightGrey&quot;],
-    &quot;D87093&quot;: [[219, 112, 147], [340, 60, 65], &quot;paleVioletRed&quot;],
-    &quot;D8BFD8&quot;: [[216, 191, 216], [300, 24, 80], &quot;thistle&quot;],
-    &quot;DA70D6&quot;: [[218, 112, 214], [302, 59, 65], &quot;orchid&quot;],
-    &quot;DAA520&quot;: [[218, 165, 32], [43, 74, 49], &quot;goldenrod&quot;],
-    &quot;DC143C&quot;: [[237, 164, 61], [35, 83, 58], &quot;crimson&quot;],
-    &quot;DCDCDC&quot;: [[220, 220, 220], [0, 0, 86], &quot;gainsboro&quot;],
-    &quot;DDA0DD&quot;: [[221, 160, 221], [300, 47, 75], &quot;plum&quot;],
-    &quot;DEB887&quot;: [[222, 184, 135], [34, 57, 70], &quot;burlyWood&quot;],
-    &quot;E0FFFF&quot;: [[224, 255, 255], [180, 100, 94], &quot;lightCyan&quot;],
-    &quot;E6E6FA&quot;: [[230, 230, 250], [240, 67, 94], &quot;lavender&quot;],
-    &quot;E9967A&quot;: [[233, 150, 122], [15, 72, 70], &quot;darkSalmon&quot;],
-    &quot;EE82EE&quot;: [[238, 130, 238], [300, 76, 72], &quot;violet&quot;],
-    &quot;EEE8AA&quot;: [[238, 232, 170], [55, 67, 80], &quot;paleGoldenrod&quot;],
-    &quot;F08080&quot;: [[240, 128, 128], [0, 79, 72], &quot;lightCoral&quot;],
-    &quot;F0E68C&quot;: [[240, 230, 140], [54, 77, 75], &quot;khaki&quot;],
-    &quot;F0F8FF&quot;: [[240, 248, 255], [208, 100, 97], &quot;aliceBlue&quot;],
-    &quot;F0FFF0&quot;: [[240, 255, 240], [120, 100, 97], &quot;honeyDew&quot;],
-    &quot;F0FFFF&quot;: [[240, 255, 255], [180, 100, 97], &quot;azure&quot;],
-    &quot;F4A460&quot;: [[244, 164, 96], [28, 87, 67], &quot;sandyBrown&quot;],
-    &quot;F5DEB3&quot;: [[245, 222, 179], [39, 77, 83], &quot;wheat&quot;],
-    &quot;F5F5DC&quot;: [[245, 245, 220], [60, 56, 91], &quot;beige&quot;],
-    &quot;F5F5F5&quot;: [[245, 245, 245], [0, 0, 96], &quot;whiteSmoke&quot;],
-    &quot;F5FFFA&quot;: [[245, 255, 250], [150, 100, 98], &quot;mintCream&quot;],
-    &quot;F8F8FF&quot;: [[248, 248, 255], [240, 100, 99], &quot;ghostWhite&quot;],
-    &quot;FA8072&quot;: [[250, 128, 114], [6, 93, 71], &quot;salmon&quot;],
-    &quot;FAEBD7&quot;: [[250, 235, 215], [34, 78, 91], &quot;antiqueWhite&quot;],
-    &quot;FAF0E6&quot;: [[250, 240, 230], [30, 67, 94], &quot;linen&quot;],
-    &quot;FAFAD2&quot;: [[250, 250, 210], [60, 80, 90], &quot;lightGoldenrodYellow&quot;],
-    &quot;FDF5E6&quot;: [[253, 245, 230], [39, 85, 95], &quot;oldLace&quot;],
-    &quot;FF0000&quot;: [[255, 0, 0], [0, 100, 50], &quot;red&quot;],
-    &quot;FF00FF&quot;: [[255, 0, 255], [300, 100, 50], &quot;magenta&quot;],
-    &quot;FF1493&quot;: [[255, 20, 147], [328, 100, 54], &quot;deepPink&quot;],
-    &quot;FF4500&quot;: [[255, 69, 0], [16, 100, 50], &quot;orangeRed&quot;],
-    &quot;FF6347&quot;: [[255, 99, 71], [9, 100, 64], &quot;tomato&quot;],
-    &quot;FF69B4&quot;: [[255, 105, 180], [330, 100, 71], &quot;hotPink&quot;],
-    &quot;FF7F50&quot;: [[255, 127, 80], [16, 100, 66], &quot;coral&quot;],
-    &quot;FF8C00&quot;: [[255, 140, 0], [33, 100, 50], &quot;darkOrange&quot;],
-    &quot;FFA07A&quot;: [[255, 160, 122], [17, 100, 74], &quot;lightSalmon&quot;],
-    &quot;FFA500&quot;: [[255, 165, 0], [39, 100, 50], &quot;orange&quot;],
-    &quot;FFB6C1&quot;: [[255, 182, 193], [351, 100, 86], &quot;lightPink&quot;],
-    &quot;FFC0CB&quot;: [[255, 192, 203], [350, 100, 88], &quot;pink&quot;],
-    &quot;FFD700&quot;: [[255, 215, 0], [51, 100, 50], &quot;gold&quot;],
-    &quot;FFDAB9&quot;: [[255, 218, 185], [28, 100, 86], &quot;peachPuff&quot;],
-    &quot;FFDEAD&quot;: [[255, 222, 173], [36, 100, 84], &quot;navajoWhite&quot;],
-    &quot;FFE4B5&quot;: [[255, 228, 181], [38, 100, 85], &quot;moccasin&quot;],
-    &quot;FFE4C4&quot;: [[255, 228, 196], [33, 100, 88], &quot;bisque&quot;],
-    &quot;FFE4E1&quot;: [[255, 228, 225], [6, 100, 94], &quot;mistyRose&quot;],
-    &quot;FFEBCD&quot;: [[255, 235, 205], [36, 100, 90], &quot;blanchedAlmond&quot;],
-    &quot;FFEFD5&quot;: [[255, 239, 213], [37, 100, 92], &quot;papayaWhip&quot;],
-    &quot;FFF0F5&quot;: [[255, 240, 245], [340, 100, 97], &quot;lavenderBlush&quot;],
-    &quot;FFF5EE&quot;: [[255, 245, 238], [25, 100, 97], &quot;seaShell&quot;],
-    &quot;FFF8DC&quot;: [[255, 248, 220], [48, 100, 93], &quot;cornsilk&quot;],
-    &quot;FFFACD&quot;: [[255, 250, 205], [54, 100, 90], &quot;lemonChiffon&quot;],
-    &quot;FFFAF0&quot;: [[255, 250, 240], [40, 100, 97], &quot;floralWhite&quot;],
-    &quot;FFFAFA&quot;: [[255, 250, 250], [0, 100, 99], &quot;snow&quot;],
-    &quot;FFFF00&quot;: [[255, 255, 0], [60, 100, 50], &quot;yellow&quot;],
-    &quot;FFFFE0&quot;: [[255, 255, 224], [60, 100, 94], &quot;lightYellow&quot;],
-    &quot;FFFFF0&quot;: [[255, 255, 240], [60, 100, 97], &quot;ivory&quot;],
-    &quot;FFFFFF&quot;: [[255, 255, 255], [0, 100, 100], &quot;white&quot;]
-};
-
-// Simple Values
</del><span class="cx"> WebInspector.Color.Nicknames = {
</span><del>-    &quot;aliceblue&quot;: &quot;F0F8FF&quot;,
-    &quot;antiquewhite&quot;: &quot;FAEBD7&quot;,
-    &quot;aqua&quot;: &quot;00FFFF&quot;,
-    &quot;aquamarine&quot;: &quot;7FFFD4&quot;,
-    &quot;azure&quot;: &quot;F0FFFF&quot;,
-    &quot;beige&quot;: &quot;F5F5DC&quot;,
-    &quot;bisque&quot;: &quot;FFE4C4&quot;,
-    &quot;black&quot;: &quot;000000&quot;,
-    &quot;blanchedalmond&quot;: &quot;FFEBCD&quot;,
-    &quot;blue&quot;: &quot;0000FF&quot;,
-    &quot;blueviolet&quot;: &quot;8A2BE2&quot;,
-    &quot;brown&quot;: &quot;A52A2A&quot;,
-    &quot;burlywood&quot;: &quot;DEB887&quot;,
-    &quot;cadetblue&quot;: &quot;5F9EA0&quot;,
-    &quot;chartreuse&quot;: &quot;7FFF00&quot;,
-    &quot;chocolate&quot;: &quot;D2691E&quot;,
-    &quot;coral&quot;: &quot;FF7F50&quot;,
-    &quot;cornflowerblue&quot;: &quot;6495ED&quot;,
-    &quot;cornsilk&quot;: &quot;FFF8DC&quot;,
-    &quot;crimson&quot;: &quot;DC143C&quot;,
-    &quot;cyan&quot;: &quot;00FFFF&quot;,
-    &quot;darkblue&quot;: &quot;00008B&quot;,
-    &quot;darkcyan&quot;: &quot;008B8B&quot;,
-    &quot;darkgoldenrod&quot;: &quot;B8860B&quot;,
-    &quot;darkgray&quot;: &quot;A9A9A9&quot;,
-    &quot;darkgreen&quot;: &quot;006400&quot;,
-    &quot;darkkhaki&quot;: &quot;BDB76B&quot;,
-    &quot;darkmagenta&quot;: &quot;8B008B&quot;,
-    &quot;darkolivegreen&quot;: &quot;556B2F&quot;,
-    &quot;darkorange&quot;: &quot;FF8C00&quot;,
-    &quot;darkorchid&quot;: &quot;9932CC&quot;,
-    &quot;darkred&quot;: &quot;8B0000&quot;,
-    &quot;darksalmon&quot;: &quot;E9967A&quot;,
-    &quot;darkseagreen&quot;: &quot;8FBC8F&quot;,
-    &quot;darkslateblue&quot;: &quot;483D8B&quot;,
-    &quot;darkslategray&quot;: &quot;2F4F4F&quot;,
-    &quot;darkturquoise&quot;: &quot;00CED1&quot;,
-    &quot;darkviolet&quot;: &quot;9400D3&quot;,
-    &quot;deeppink&quot;: &quot;FF1493&quot;,
-    &quot;deepskyblue&quot;: &quot;00BFFF&quot;,
-    &quot;dimgray&quot;: &quot;696969&quot;,
-    &quot;dodgerblue&quot;: &quot;1E90FF&quot;,
-    &quot;firebrick&quot;: &quot;B22222&quot;,
-    &quot;floralwhite&quot;: &quot;FFFAF0&quot;,
-    &quot;forestgreen&quot;: &quot;228B22&quot;,
-    &quot;fuchsia&quot;: &quot;FF00FF&quot;,
-    &quot;gainsboro&quot;: &quot;DCDCDC&quot;,
-    &quot;ghostwhite&quot;: &quot;F8F8FF&quot;,
-    &quot;gold&quot;: &quot;FFD700&quot;,
-    &quot;goldenrod&quot;: &quot;DAA520&quot;,
-    &quot;gray&quot;: &quot;808080&quot;,
-    &quot;green&quot;: &quot;008000&quot;,
-    &quot;greenyellow&quot;: &quot;ADFF2F&quot;,
-    &quot;honeydew&quot;: &quot;F0FFF0&quot;,
-    &quot;hotpink&quot;: &quot;FF69B4&quot;,
-    &quot;indianred&quot;: &quot;CD5C5C&quot;,
-    &quot;indigo&quot;: &quot;4B0082&quot;,
-    &quot;ivory&quot;: &quot;FFFFF0&quot;,
-    &quot;khaki&quot;: &quot;F0E68C&quot;,
-    &quot;lavender&quot;: &quot;E6E6FA&quot;,
-    &quot;lavenderblush&quot;: &quot;FFF0F5&quot;,
-    &quot;lawngreen&quot;: &quot;7CFC00&quot;,
-    &quot;lemonchiffon&quot;: &quot;FFFACD&quot;,
-    &quot;lightblue&quot;: &quot;ADD8E6&quot;,
-    &quot;lightcoral&quot;: &quot;F08080&quot;,
-    &quot;lightcyan&quot;: &quot;E0FFFF&quot;,
-    &quot;lightgoldenrodyellow&quot;: &quot;FAFAD2&quot;,
-    &quot;lightgreen&quot;: &quot;90EE90&quot;,
-    &quot;lightgrey&quot;: &quot;D3D3D3&quot;,
-    &quot;lightpink&quot;: &quot;FFB6C1&quot;,
-    &quot;lightsalmon&quot;: &quot;FFA07A&quot;,
-    &quot;lightseagreen&quot;: &quot;20B2AA&quot;,
-    &quot;lightskyblue&quot;: &quot;87CEFA&quot;,
-    &quot;lightslategray&quot;: &quot;778899&quot;,
-    &quot;lightsteelblue&quot;: &quot;B0C4DE&quot;,
-    &quot;lightyellow&quot;: &quot;FFFFE0&quot;,
-    &quot;lime&quot;: &quot;00FF00&quot;,
-    &quot;limegreen&quot;: &quot;32CD32&quot;,
-    &quot;linen&quot;: &quot;FAF0E6&quot;,
-    &quot;magenta&quot;: &quot;FF00FF&quot;,
-    &quot;maroon&quot;: &quot;800000&quot;,
-    &quot;mediumaquamarine&quot;: &quot;66CDAA&quot;,
-    &quot;mediumblue&quot;: &quot;0000CD&quot;,
-    &quot;mediumorchid&quot;: &quot;BA55D3&quot;,
-    &quot;mediumpurple&quot;: &quot;9370DB&quot;,
-    &quot;mediumseagreen&quot;: &quot;3CB371&quot;,
-    &quot;mediumslateblue&quot;: &quot;7B68EE&quot;,
-    &quot;mediumspringgreen&quot;: &quot;00FA9A&quot;,
-    &quot;mediumturquoise&quot;: &quot;48D1CC&quot;,
-    &quot;mediumvioletred&quot;: &quot;C71585&quot;,
-    &quot;midnightblue&quot;: &quot;191970&quot;,
-    &quot;mintcream&quot;: &quot;F5FFFA&quot;,
-    &quot;mistyrose&quot;: &quot;FFE4E1&quot;,
-    &quot;moccasin&quot;: &quot;FFE4B5&quot;,
-    &quot;navajowhite&quot;: &quot;FFDEAD&quot;,
-    &quot;navy&quot;: &quot;000080&quot;,
-    &quot;oldlace&quot;: &quot;FDF5E6&quot;,
-    &quot;olive&quot;: &quot;808000&quot;,
-    &quot;olivedrab&quot;: &quot;6B8E23&quot;,
-    &quot;orange&quot;: &quot;FFA500&quot;,
-    &quot;orangered&quot;: &quot;FF4500&quot;,
-    &quot;orchid&quot;: &quot;DA70D6&quot;,
-    &quot;palegoldenrod&quot;: &quot;EEE8AA&quot;,
-    &quot;palegreen&quot;: &quot;98FB98&quot;,
-    &quot;paleturquoise&quot;: &quot;AFEEEE&quot;,
-    &quot;palevioletred&quot;: &quot;DB7093&quot;,
-    &quot;papayawhip&quot;: &quot;FFEFD5&quot;,
-    &quot;peachpuff&quot;: &quot;FFDAB9&quot;,
-    &quot;peru&quot;: &quot;CD853F&quot;,
-    &quot;pink&quot;: &quot;FFC0CB&quot;,
-    &quot;plum&quot;: &quot;DDA0DD&quot;,
-    &quot;powderblue&quot;: &quot;B0E0E6&quot;,
-    &quot;purple&quot;: &quot;800080&quot;,
-    &quot;red&quot;: &quot;FF0000&quot;,
-    &quot;rosybrown&quot;: &quot;BC8F8F&quot;,
-    &quot;royalblue&quot;: &quot;4169E1&quot;,
-    &quot;saddlebrown&quot;: &quot;8B4513&quot;,
-    &quot;salmon&quot;: &quot;FA8072&quot;,
-    &quot;sandybrown&quot;: &quot;F4A460&quot;,
-    &quot;seagreen&quot;: &quot;2E8B57&quot;,
-    &quot;seashell&quot;: &quot;FFF5EE&quot;,
-    &quot;sienna&quot;: &quot;A0522D&quot;,
-    &quot;silver&quot;: &quot;C0C0C0&quot;,
-    &quot;skyblue&quot;: &quot;87CEEB&quot;,
-    &quot;slateblue&quot;: &quot;6A5ACD&quot;,
-    &quot;slategray&quot;: &quot;708090&quot;,
-    &quot;snow&quot;: &quot;FFFAFA&quot;,
-    &quot;springgreen&quot;: &quot;00FF7F&quot;,
-    &quot;steelblue&quot;: &quot;4682B4&quot;,
-    &quot;tan&quot;: &quot;D2B48C&quot;,
-    &quot;teal&quot;: &quot;008080&quot;,
-    &quot;thistle&quot;: &quot;D8BFD8&quot;,
-    &quot;tomato&quot;: &quot;FF6347&quot;,
-    &quot;turquoise&quot;: &quot;40E0D0&quot;,
-    &quot;violet&quot;: &quot;EE82EE&quot;,
-    &quot;wheat&quot;: &quot;F5DEB3&quot;,
-    &quot;white&quot;: &quot;FFFFFF&quot;,
-    &quot;whitesmoke&quot;: &quot;F5F5F5&quot;,
-    &quot;yellow&quot;: &quot;FFFF00&quot;,
-    &quot;yellowgreen&quot;: &quot;9ACD32&quot;
</del><ins>+    &quot;aliceblue&quot;: [240, 248, 255],
+    &quot;antiquewhite&quot;: [250, 235, 215],
+    &quot;aquamarine&quot;: [127, 255, 212],
+    &quot;azure&quot;: [240, 255, 255],
+    &quot;beige&quot;: [245, 245, 220],
+    &quot;bisque&quot;: [255, 228, 196],
+    &quot;black&quot;: [0, 0, 0],
+    &quot;blanchedalmond&quot;: [255, 235, 205],
+    &quot;blue&quot;: [0, 0, 255],
+    &quot;blueviolet&quot;: [138, 43, 226],
+    &quot;brown&quot;: [165, 42, 42],
+    &quot;burlywood&quot;: [222, 184, 135],
+    &quot;cadetblue&quot;: [95, 158, 160],
+    &quot;chartreuse&quot;: [127, 255, 0],
+    &quot;chocolate&quot;: [210, 105, 30],
+    &quot;coral&quot;: [255, 127, 80],
+    &quot;cornflowerblue&quot;: [100, 149, 237],
+    &quot;cornsilk&quot;: [255, 248, 220],
+    &quot;crimson&quot;: [237, 164, 61],
+    &quot;cyan&quot;: [0, 255, 255],
+    &quot;darkblue&quot;: [0, 0, 139],
+    &quot;darkcyan&quot;: [0, 139, 139],
+    &quot;darkgoldenrod&quot;: [184, 134, 11],
+    &quot;darkgray&quot;: [169, 169, 169],
+    &quot;darkgreen&quot;: [0, 100, 0],
+    &quot;darkkhaki&quot;: [189, 183, 107],
+    &quot;darkmagenta&quot;: [139, 0, 139],
+    &quot;darkolivegreen&quot;: [85, 107, 47],
+    &quot;darkorange&quot;: [255, 140, 0],
+    &quot;darkorchid&quot;: [153, 50, 204],
+    &quot;darkred&quot;: [139, 0, 0],
+    &quot;darksalmon&quot;: [233, 150, 122],
+    &quot;darkseagreen&quot;: [143, 188, 143],
+    &quot;darkslateblue&quot;: [72, 61, 139],
+    &quot;darkslategray&quot;: [47, 79, 79],
+    &quot;darkturquoise&quot;: [0, 206, 209],
+    &quot;darkviolet&quot;: [148, 0, 211],
+    &quot;deeppink&quot;: [255, 20, 147],
+    &quot;deepskyblue&quot;: [0, 191, 255],
+    &quot;dimgray&quot;: [105, 105, 105],
+    &quot;dodgerblue&quot;: [30, 144, 255],
+    &quot;firebrick&quot;: [178, 34, 34],
+    &quot;floralwhite&quot;: [255, 250, 240],
+    &quot;forestgreen&quot;: [34, 139, 34],
+    &quot;gainsboro&quot;: [220, 220, 220],
+    &quot;ghostwhite&quot;: [248, 248, 255],
+    &quot;gold&quot;: [255, 215, 0],
+    &quot;goldenrod&quot;: [218, 165, 32],
+    &quot;gray&quot;: [128, 128, 128],
+    &quot;green&quot;: [0, 128, 0],
+    &quot;greenyellow&quot;: [173, 255, 47],
+    &quot;honeydew&quot;: [240, 255, 240],
+    &quot;hotpink&quot;: [255, 105, 180],
+    &quot;indianred&quot;: [205, 92, 92],
+    &quot;indigo&quot;: [75, 0, 130],
+    &quot;ivory&quot;: [255, 255, 240],
+    &quot;khaki&quot;: [240, 230, 140],
+    &quot;lavender&quot;: [230, 230, 250],
+    &quot;lavenderblush&quot;: [255, 240, 245],
+    &quot;lawngreen&quot;: [124, 252, 0],
+    &quot;lemonchiffon&quot;: [255, 250, 205],
+    &quot;lightblue&quot;: [173, 216, 230],
+    &quot;lightcoral&quot;: [240, 128, 128],
+    &quot;lightcyan&quot;: [224, 255, 255],
+    &quot;lightgoldenrodyellow&quot;: [250, 250, 210],
+    &quot;lightgreen&quot;: [144, 238, 144],
+    &quot;lightgrey&quot;: [211, 211, 211],
+    &quot;lightpink&quot;: [255, 182, 193],
+    &quot;lightsalmon&quot;: [255, 160, 122],
+    &quot;lightseagreen&quot;: [32, 178, 170],
+    &quot;lightskyblue&quot;: [135, 206, 250],
+    &quot;lightslategray&quot;: [119, 136, 153],
+    &quot;lightsteelblue&quot;: [176, 196, 222],
+    &quot;lightyellow&quot;: [255, 255, 224],
+    &quot;lime&quot;: [0, 255, 0],
+    &quot;limegreen&quot;: [50, 205, 50],
+    &quot;linen&quot;: [250, 240, 230],
+    &quot;magenta&quot;: [255, 0, 255],
+    &quot;maroon&quot;: [128, 0, 0],
+    &quot;mediumaquamarine&quot;: [102, 205, 170],
+    &quot;mediumblue&quot;: [0, 0, 205],
+    &quot;mediumorchid&quot;: [186, 85, 211],
+    &quot;mediumpurple&quot;: [147, 112, 219],
+    &quot;mediumseagreen&quot;: [60, 179, 113],
+    &quot;mediumslateblue&quot;: [123, 104, 238],
+    &quot;mediumspringgreen&quot;: [0, 250, 154],
+    &quot;mediumturquoise&quot;: [72, 209, 204],
+    &quot;mediumvioletred&quot;: [199, 21, 133],
+    &quot;midnightblue&quot;: [25, 25, 112],
+    &quot;mintcream&quot;: [245, 255, 250],
+    &quot;mistyrose&quot;: [255, 228, 225],
+    &quot;moccasin&quot;: [255, 228, 181],
+    &quot;navajowhite&quot;: [255, 222, 173],
+    &quot;navy&quot;: [0, 0, 128],
+    &quot;oldlace&quot;: [253, 245, 230],
+    &quot;olive&quot;: [128, 128, 0],
+    &quot;olivedrab&quot;: [107, 142, 35],
+    &quot;orange&quot;: [255, 165, 0],
+    &quot;orangered&quot;: [255, 69, 0],
+    &quot;orchid&quot;: [218, 112, 214],
+    &quot;palegoldenrod&quot;: [238, 232, 170],
+    &quot;palegreen&quot;: [152, 251, 152],
+    &quot;paleturquoise&quot;: [175, 238, 238],
+    &quot;palevioletred&quot;: [219, 112, 147],
+    &quot;papayawhip&quot;: [255, 239, 213],
+    &quot;peachpuff&quot;: [255, 218, 185],
+    &quot;peru&quot;: [205, 133, 63],
+    &quot;pink&quot;: [255, 192, 203],
+    &quot;plum&quot;: [221, 160, 221],
+    &quot;powderblue&quot;: [176, 224, 230],
+    &quot;purple&quot;: [128, 0, 128],
+    &quot;red&quot;: [255, 0, 0],
+    &quot;rosybrown&quot;: [188, 143, 143],
+    &quot;royalblue&quot;: [65, 105, 225],
+    &quot;saddlebrown&quot;: [139, 69, 19],
+    &quot;salmon&quot;: [250, 128, 114],
+    &quot;sandybrown&quot;: [244, 164, 96],
+    &quot;seagreen&quot;: [46, 139, 87],
+    &quot;seashell&quot;: [255, 245, 238],
+    &quot;sienna&quot;: [160, 82, 45],
+    &quot;silver&quot;: [192, 192, 192],
+    &quot;skyblue&quot;: [135, 206, 235],
+    &quot;slateblue&quot;: [106, 90, 205],
+    &quot;slategray&quot;: [112, 128, 144],
+    &quot;snow&quot;: [255, 250, 250],
+    &quot;springgreen&quot;: [0, 255, 127],
+    &quot;steelblue&quot;: [70, 130, 180],
+    &quot;tan&quot;: [210, 180, 140],
+    &quot;teal&quot;: [0, 128, 128],
+    &quot;thistle&quot;: [216, 191, 216],
+    &quot;tomato&quot;: [255, 99, 71],
+    &quot;turquoise&quot;: [64, 224, 208],
+    &quot;violet&quot;: [238, 130, 238],
+    &quot;wheat&quot;: [245, 222, 179],
+    &quot;white&quot;: [255, 255, 255],
+    &quot;whitesmoke&quot;: [245, 245, 245],
+    &quot;yellow&quot;: [255, 255, 0],
+    &quot;yellowgreen&quot;: [154, 205, 50]
</ins><span class="cx"> };
</span><span class="cx"> 
</span><del>-// Advanced Values [rgba, hsla, nickname]
-WebInspector.Color.AdvancedNickNames = {
-    &quot;transparent&quot;: [[0, 0, 0, 0], [0, 0, 0, 0], &quot;transparent&quot;],
-    &quot;rgba(0,0,0,0)&quot;: [[0, 0, 0, 0], [0, 0, 0, 0], &quot;transparent&quot;],
-    &quot;hsla(0,0,0,0)&quot;: [[0, 0, 0, 0], [0, 0, 0, 0], &quot;transparent&quot;],
-};
-
</del><span class="cx"> WebInspector.Color.rgb2hsv = function(r, g, b)
</span><span class="cx"> {
</span><span class="cx">     r /= 255;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceColorPickerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/ColorPicker.js (160131 => 160132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/ColorPicker.js        2013-12-04 23:07:04 UTC (rev 160131)
+++ trunk/Source/WebInspectorUI/UserInterface/ColorPicker.js        2013-12-04 23:16:59 UTC (rev 160132)
</span><span class="lines">@@ -95,10 +95,12 @@
</span><span class="cx">     {
</span><span class="cx">         this._dontUpdateColor = true;
</span><span class="cx"> 
</span><ins>+        this._colorFormat = color.format;
+
</ins><span class="cx">         this._colorWheel.tintedColor = color;
</span><span class="cx">         this._brightnessSlider.value = this._colorWheel.brightness;
</span><span class="cx"> 
</span><del>-        this._opacitySlider.value = isNaN(color.alpha) ? 1 : color.alpha;
</del><ins>+        this._opacitySlider.value = color.alpha;
</ins><span class="cx">         this._updateSliders(this._colorWheel.rawColor, color);
</span><span class="cx"> 
</span><span class="cx">         delete this._dontUpdateColor;
</span><span class="lines">@@ -125,15 +127,15 @@
</span><span class="cx">         if (this._dontUpdateColor)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        var rgb = this._colorWheel.tintedColor.rgb;
-        this._color = WebInspector.Color.fromRGBA(rgb[0], rgb[1], rgb[2], this._opacity).toString();
</del><ins>+        var rgba = this._colorWheel.tintedColor.rgb.concat(this._opacity);
+        this._color = new WebInspector.Color(WebInspector.Color.Format.RGBA, rgba).toString(this._colorFormat);
</ins><span class="cx">         this.dispatchEventToListeners(WebInspector.ColorPicker.Event.ColorChanged, {color: this._color});
</span><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     _updateSliders: function(rawColor, tintedColor)
</span><span class="cx">     {
</span><del>-        var rgb = this._colorWheel.tintedColor.rgb;
-        var transparent = WebInspector.Color.fromRGBA(rgb[0], rgb[1], rgb[2], 0).toString();
</del><ins>+        var rgba = this._colorWheel.tintedColor.rgb.concat(0);
+        var transparent = new WebInspector.Color(WebInspector.Color.Format.RGBA, rgba).toString();
</ins><span class="cx"> 
</span><span class="cx">         this._opacitySlider.element.style.backgroundImage = &quot;linear-gradient(90deg, &quot; + transparent + &quot;, &quot; + tintedColor + &quot;), &quot; + this._opacityPattern;
</span><span class="cx">         this._brightnessSlider.element.style.backgroundImage = &quot;linear-gradient(90deg, black, &quot; + rawColor + &quot;)&quot;;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceColorWheeljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/ColorWheel.js (160131 => 160132)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/ColorWheel.js        2013-12-04 23:07:04 UTC (rev 160131)
+++ trunk/Source/WebInspectorUI/UserInterface/ColorWheel.js        2013-12-04 23:16:59 UTC (rev 160132)
</span><span class="lines">@@ -240,11 +240,12 @@
</span><span class="cx">         var s = Math.max(0, distance) / center;
</span><span class="cx"> 
</span><span class="cx">         var rgb = WebInspector.Color.hsv2rgb(h, s, v);
</span><del>-        return WebInspector.Color.fromRGB(
</del><ins>+        return new WebInspector.Color(WebInspector.Color.Format.RGBA, [
</ins><span class="cx">             Math.round(rgb[0] * 255),
</span><span class="cx">             Math.round(rgb[1] * 255),
</span><del>-            Math.round(rgb[2] * 255)
-        );
</del><ins>+            Math.round(rgb[2] * 255),
+            1
+        ]);
</ins><span class="cx">     },
</span><span class="cx">     
</span><span class="cx">     _drawTintedCanvas: function()
</span></span></pre>
</div>
</div>

</body>
</html>