diff --git a/src/components/fields/ColorField.jsx b/src/components/fields/ColorField.jsx index 1ff229a..73776c6 100644 --- a/src/components/fields/ColorField.jsx +++ b/src/components/fields/ColorField.jsx @@ -50,7 +50,16 @@ class ColorField extends React.Component { } get color() { - return Color(this.props.value || '#fff').rgb() + let color = Color("rgb(255,255,255)"); + + // Catch invalid color. + try { + return Color(this.props.value).rgb() + } + catch(err) { + console.warn("Error parsing color: ", err); + } + return color; } render() {