This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// return array of [r,g,b,a] from any valid color. if failed returns undefined | |
function colorValues(color) | |
{ | |
if (!color) | |
return; | |
if (color.toLowerCase() === 'transparent') | |
return [0, 0, 0, 0]; | |
if (color[0] === '#') | |
{ | |
if (color.length < 7) |