Validates the color value, providing an error message if invalid, otherwise None.
Validates the color value, providing an error message if invalid, otherwise None.
Implementation note: future versions of the library, once based on Scala 3, will hopefully offer
compile-time validation of color and length values.
But we want to avoid a dependency on a library like refined which is based on Scala 2 macros
which will not be supported in Scala 3.