I moved this (unchanged) from Node.js to util.js as it's no longer specific to parsing colors for Nodes.