text: function colorStringToHex (color) {
      if (color.substr(0, 1) === '#') {
          return color;
      }
      var digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(color);
      
      var red = parseInt(digits[2], 10);
      var green = parseInt(digits[3], 10);
      var blue = parseInt(digits[4], 10);
      
      var rgb = blue | (green << 8) | (red << 16);
      return digits[1] + '#' + rgb.toString(16);
  }
  