regexValidModernColorFunc top-level constant
String
const regexValidModernColorFunc
Modern color function regex – it now outright disallows any commas inside the parentheses.
Implementation
const regexValidModernColorFunc =
r'^(?:(?:rgb|hsl|hwb|lab|lch)a?|color)\(\s*([^,]+)\s*\)$';