Versatile, multiline matching of CSS colors of many common formats, including:
[x] HEX-3: #123 (equivalent to #112233)
[x] HEX-4: #FA0F ( ... #FFAA00FF)
[x] HEX-6: #FF3300 ( ...#F30)
[x] HEX-8: #FFAA00FF ( ...#FA0F)
[x] RGB: rgb(0, 0, 0)
[x] RGBA: rgba(255, 255, 255, 1.0)
[x] HSL: hsl(100, 50%, 50%)
[x] HSLA: hsla(100, 20%, 20%, 1.0)
[x] Vars: var(--tw-color-name, #000000)
[x] Misc: color: inherit; color: currentColor; color: initial;, etc.
With or without trailing semicolon or comma
Forgiving of whitespace issues
Allows property/declaration names (e.g. color: #fff), most other solutions do not.