diff --git modules/image/image.admin.inc modules/image/image.admin.inc
index d72fdf4..fbe5161 100644
--- modules/image/image.admin.inc
+++ modules/image/image.admin.inc
@@ -476,11 +476,8 @@ function image_effect_integer_validate($element, &$form_state) {
  * Element validate handler to ensure a hexadecimal color value.
  */
 function image_effect_color_validate($element, &$form_state) {
-  if ($element['#value'] != '') {
-    $hex_value = preg_replace('/^#/', '', $element['#value']);
-    if (!preg_match('/^#[0-9A-F]{3}([0-9A-F]{3})?$/', $element['#value'])) {
-      form_error($element, t('!name must be a hexadecimal color value.', array('!name' => $element['#title'])));
-    }
+  if (empty($element['#value']) || !preg_match('/^#[0-9A-F]{3}([0-9A-F]{3})?$/', $element['#value'])) {
+     form_error($element, t('!name must be a hexadecimal color value.', array('!name' => $element['#title'])));
   }
 }
 
