title: Serializer for Drawing.Color using Json.NET
body: <p>I want to change the default serializer in <code>Newtonsoft.Json</code> for <code>System.Drawing.Color</code>. Instead of the default string value I would like to fire this method:</p>
  <pre><code>public string ToHtml(Color c)
      =&gt; $&quot;rgba({c.R},{c.G},{c.B},{c.A / 255f})&quot;;
  </code></pre>
  <p>Every time an object of type <code>Color</code> is to be resolved. This is the format to be consumed by CSS.</p>
  <p>What is an elegant, yet simple way to accomplish this?</p>
  <h3>EDIT</h3>
  <p>Here is an example json I want to create:</p>
  <pre><code>{
    &quot;color&quot;: &quot;rgba(80,80,80,0.5)&quot;
  }
  </code></pre>