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