code: function parseSimpleColor(color) {
  	color = normalizeColor(color);
  	var matches = /^rgb\(([0-9]+), ([0-9]+), ([0-9]+)\)$/.exec(color);
  	if (matches) {
  		return "#"
  			+ parseInt(matches[1]).toString(16).replace(/^.$/, "0$&")
  			+ parseInt(matches[2]).toString(16).replace(/^.$/, "0$&")
  			+ parseInt(matches[3]).toString(16).replace(/^.$/, "0$&");
  	}
  	return null;
  }
docs: Returns either null, or something of the form #xxxxxx.