Gimp.RGB.prototype.parse_css

function parse_css(css: Array(String)): Boolean {
    // Gjs wrapper for gimp_rgb_parse_css()
}
  

Attempts to parse a string describing an RGB 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 Gimp.RGB.prototype.parse_hex (##ff0000) or a color name as parsed by Gimp.RGB.prototype.parse_name (red).

This function does not touch the alpha component of rgb.

Since 2.2

css

a string describing a color in CSS notation

Returns

true if css was parsed successfully and rgb has been set, false otherwise