diff --git a/src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp b/src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp
index c632e489a223e98325006217e37f07ed6d270194..610eef28fafe743179591cb8f703ef581b939599 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp
@@ -70,7 +70,7 @@ static inline QString properName(const QColor &color)
 
 static inline QColor properColor(const QString &str)
 {
-    if (str.isNull())
+    if (str.isEmpty())
         return QColor();
     int lalpha = 255;
     QString lcolorStr = str;