cq-prolyfill.js
function parseColor(color) {

	// Let the browser round the RGBA values for consistency
	parseColorStyle.cssText = 'color:' + color;
	color = parseColorStyle.color;

	if (!color || !color.split || !color.split('(')[1]) {
		return [0, 0, 0, 0];
	}

	color = color.split('(')[1].split(',').map(parseFloat);

	if (color[3] === undefined) {
		color[3] = 1;
	}
	else if (!color[3]) {
		color[0] = color[1] = color[2] = 0;
	}

	color[3] = Math.round(color[3] * 255);

	return rgbaToHsla(color);

}
function parseColor(color) {

	// Let the browser round the RGBA values for consistency
	parseColorStyle.cssText = 'color:' + color;
	color = parseColorStyle.color;

	if (!color || !color.split || !color.split('(')[1]) {
		return [0, 0, 0, 0];
	}

	color = color.split('(')[1].split(',').map(parseFloat);

	if (color[3] === undefined) {
		color[3] = 1;
	}
	else if (!color[3]) {
		color[0] = color[1] = color[2] = 0;
	}

	color[3] = Math.round(color[3] * 255);

	return rgbaToHsla(color);

}
function parseColor ( color ) { // Let the browser round the RGBA values for consistency parseColorStyle . cssText = 'color:' + color ; color = parseColorStyle . color ; if ( ! color || ! color . split || ! color . split ( '(' ) [ 1 ] ) { return [ 0 , 0 , 0 , 0 ] ; } color = color . split ( '(' ) [ 1 ] . split ( ',' ) . map ( parseFloat ) ; if ( color [ 3 ] === undefined ) { color [ 3 ] = 1 ; } else if ( ! color [ 3 ] ) { color [ 0 ] = color [ 1 ] = color [ 2 ] = 0 ; } color [ 3 ] = Math . round ( color [ 3 ] * 255 ) ; return rgbaToHsla ( color ) ; }
Parse CSS color and return as HSLA array

@param  {string} color
@return {Array.<number>}
Parse CSS color and return as HSLA array