<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: Autocomplete CSS system colors"
   href="https://bugs.webkit.org/show_bug.cgi?id=154525#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: Autocomplete CSS system colors"
   href="https://bugs.webkit.org/show_bug.cgi?id=154525">bug 154525</a>
              from <span class="vcard"><a class="email" href="mailto:joepeck&#64;webkit.org" title="Joseph Pecoraro &lt;joepeck&#64;webkit.org&gt;"> <span class="fn">Joseph Pecoraro</span></a>
</span></b>
        <pre>I notice you didn't assign this bug to you. Are you going to put up a patch for this?

What is interesting about this is that the actual color is only known by the backend, not the frontend. So to produce an accurate color swatch for &quot;highlight&quot; you have to check what &quot;highlight&quot; actually resolves to on the target. This is important remotely inspecting a target.

You could for instance evaluate some JavaScript and get the computed style of something with that color. Note the element has to be in the DOM, so appending to the &lt;head&gt; ensures the element won't cause any visible change to the page when doing the calculation:

    var span = document.createElement(&quot;span&quot;);
    span.style.backgroundColor = &quot;highlight&quot;;
    document.head.appendChild(span);
    var rgbColor = getComputedStyle(span).backgroundColor;
    span.remove();
    rgbColor // rgb(...)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>