maybeParse static method
Implementation
static ColorValue? maybeParse(dynamic value) {
if (value == null || value is! String) return null;
if (value.startsWith('#')) {
return _transformHex(value);
} else if (value.startsWith('rgb')) {
return _transformRgb(value);
} else if (value.startsWith('hsl')) {
return _transformHsl(value);
}
return null;
}