--- H:/home/example/drupal-7.0-alpha4/modules/color/color.module	Fri Apr 23 09:25:32 2010
+++ H:/home/example/public_html/modules/color/color.module	Mon May 03 18:10:45 2010
@@ -126,8 +126,48 @@
   if ($path && file_exists($file)) {
     include $file;
     $theme_info[$theme] = $info;
-    return $info;
+//    return $info;
   }
+  /* PeterX */
+  $file = DRUPAL_ROOT . '/' . $path . '/' . $theme . '.info';
+  $info = drupal_parse_info_file($file);
+  if(!empty($info['color'])) {
+    $field_translate = array();
+    if(!empty($info['color']['field'])) {
+      $field_translate = $info['color']['field'];
+      $theme_info[$theme]['fields'] = $info['color']['field'];
+      unset($info['color']['field']);
+    }
+    foreach($info['color'] as $scheme => $scheme_field) {
+      $theme_info[$theme]['schemes'][_color_get_info_clean($scheme)]['title'] = $scheme;
+      foreach($scheme_field as $field => $color) {
+        if(empty($field_translate)) {
+          // We do not translate the field.
+          $theme_info[$theme]['schemes'][_color_get_info_clean($scheme)]['colors'][_color_get_info_clean($field)] = _color_get_info_color_clean($color);
+          $theme_info[$theme]['fields'][_color_get_info_clean($field)] = $field;
+        } else {
+          // Translate the long field name into the internal name.
+          $field_key = array_search($field, $field_translate);
+          if($field_key !== false) {
+            $theme_info[$theme]['schemes'][_color_get_info_clean($scheme)]['colors'][$field_key] = _color_get_info_color_clean($color);
+          } else {
+            $theme_info[$theme]['schemes'][_color_get_info_clean($scheme)]['colors'][_color_get_info_clean($field)] = _color_get_info_color_clean($color);
+          }
+        }
+      }
+    }
+  }
+  if (isset($theme_info[$theme])) {
+    return $theme_info[$theme];
+  }
+  
+}
+// The following functions to be refined based on what is legan in .info files.
+function _color_get_info_clean($string) {
+  return str_replace(' ', '_', strtolower($string));
+}
+function _color_get_info_color_clean($string) {
+  return '#' . str_replace(array('_', '#'), '', _color_get_info_clean($string));
 }
 
 /**
