Skip to content

Instantly share code, notes, and snippets.

@BOSSoNe0013
Created December 8, 2016 07:49
Show Gist options
  • Save BOSSoNe0013/f6db0c70f2508402182b438ca0a5fbb2 to your computer and use it in GitHub Desktop.
Save BOSSoNe0013/f6db0c70f2508402182b438ca0a5fbb2 to your computer and use it in GitHub Desktop.
Parse css rgb color with javascript
var css = 'rgb(128,128,128)';
var channels={};
[channels.red, channels.green, channels.blue] = css.replace(/[rgb\(\) ]/g, '').split(',');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment