from static method
Implementation
static CSSColorHEX? from(Object? color) {
if (color == null) return null;
if (color is CSSColorHEX) {
return color;
} else if (color is CSSColorHEXAlpha) {
return color;
} else if (color is String) {
return CSSColorHEX.parse(color);
}
return null;
}