decode
fun Color.Companion.decode(raw: String, vararg decoders: ColorDecoder = arrayOf(
HexColorDecoder,
RgbColorDecoder,
RgbaColorDecoder,
HsvHslColorDecoder,
NamedColorDecoder,
)): Color?
Decodes a Color from a raw string using the first decoder that successfully decodes it.
Return
a successfully decoded Color, or null
if no decoder can decode it
Parameters
raw
raw string
decoders
ordered list of decoders. Defaults to all decoders.