<?xml version="1.0"?>
<page id="Gimp.color_parse_css"
      type="topic"
      style="function"
      xmlns="http://projectmallard.org/1.0/"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/1.0/ui/">
  <info>
    <link xref="index" group="function" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>Gegl.Color</api:type>
      </api:returns>
      <api:name>gimp_color_parse_css</api:name>
      <api:arg>
        <api:type>Array(String)</api:type>
        <api:name>css</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>Gimp.color_parse_css</title>
  <synopsis><code mime="text/x-gjs">
function color_parse_css(css: Array(String)): <link href="../Gegl-0.4/Gegl.Color.html">Gegl.Color</link> {
    // Gjs wrapper for gimp_color_parse_css()
}
  </code></synopsis>
  <p>Attempts to parse a string describing an sRGB color in CSS notation. This can
be either a numerical representation (`rgb(255,0,0)` or `rgb(100%,0%,0%)`)
or a hexadecimal notation as parsed by <link xref="Gimp.color_parse_hex"/>
(`##ff0000`) or a color name as parsed by <link xref="Gimp.color_parse_name"/> (`red`).</p>  <p>Additionally the `rgba()`, `hsl()` and `hsla()` functions are supported too.</p>
  <p>Since 2.2</p>
<terms>
<item>
<title><code>css</code></title>
  <p>a string describing a color in CSS notation</p>
</item>
<item>
<title><code>Returns</code></title>
  <p>a newly allocated [class@Gegl.Color] if <code>css</code> was
                          parsed successfully, <code>null</code> otherwise</p>
</item>
</terms>

</page>
