Test, validate and match regular expressions
This regex matches color values in two common formats: hex codes (optionally prefixed with '#') consisting of exactly six word characters, and RGB notation with three comma-separated numbers (1-3 digits each) inside parentheses, allowing optional spaces around numbers and after commas. It is useful for extracting or validating color definitions from text, CSS, or configuration files, and can be used with the global flag to find all color occurrences in a string.