^start of string
rgbthe literal text rgb (case insensitive) hslthe literal text hsl (case insensitive) a?optionally matches the literal a (9710 / 1418 / 6116) (case insensitive)
\(the literal ( (4010 / 508 / 2816)
Group 2(\d+%?(deg|rad|grad|turn)?[,\s]+){2,3} {2,3}repeats the group contents below between 2 and 3 times:
\d+a digit, repeated at least once
%?optionally matches the literal % (3710 / 458 / 2516)
Group 3(deg|rad|grad|turn)? ?repeats the group contents below at most once:
degthe literal text deg (case insensitive) radthe literal text rad (case insensitive) gradthe literal text grad (case insensitive) turnthe literal text turn (case insensitive) +matches at least one character from the set below:
,the literal , (4410 / 548 / 2C16)
\sany whitespace character
*matches any number of characters from the set below:
\sany whitespace character
\/the literal / (4710 / 578 / 2F16)
+matches at least one character from the set below:
\da digit
\.the literal . (4610 / 568 / 2E16)
%?optionally matches the literal % (3710 / 458 / 2516)
\)the literal ) (4110 / 518 / 2916)
$end of string, or before its final line terminator
i modifier: insensitive. Matches without distinguishing uppercase and lowercase letters