rem: }  if (v[0] == "#") {  return v; }   return null; }; 
add: }; 
context: HTMLArea._colorToRgb = function(v) {	// returns the hex representation of one byte (2 digits)	function hex(d) {		return (d < 16) ? ("0" + d.toString(16)) : d.toString(16);	};	if (typeof v == "number") {		// we're talking to IE here		var r = v & 0xFF;		var g = (v >> 8) & 0xFF;		var b = (v >> 16) & 0xFF;		return "#" + hex(r) + hex(g) + hex(b);	}	if (v.substr(0, 3) == "rgb") {		// in rgb(...) form -- Mozilla		var re = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/;		if (v.match(re)) {			var r = parseInt(RegExp.$1);			var g = parseInt(RegExp.$2);			var b = parseInt(RegExp.$3);			return "#" + hex(r) + hex(g) + hex(b);		}		// doesn't match RE?!  maybe uses percentages or float numbers		// -- FIXME: not yet implemented.		return null;	}	if (v[0] == "#") {		// already hex rgb (hopefully :D )		return v;	}	// if everything else fails ;)	return null;};
meta: 7119	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7119/25a8b4ec79bdd65c7e50216b7ea058ea682797c5/htmlarea.js/clean/phpgwapi/js/htmlarea/htmlarea.js