Skip to content

Instantly share code, notes, and snippets.

@minodisk
Created March 11, 2012 00:17
Show Gist options
  • Save minodisk/2014188 to your computer and use it in GitHub Desktop.
Save minodisk/2014188 to your computer and use it in GitHub Desktop.
How to use ColorJS
RGB(new HSV(0, 1, 1));
HSV(new RGB(255, 0, 0));
new RGB(255, 0, 0);
new RGB(0xff0000);
new RGB('#ff0000');
new RGB('rgb(255, 0, 0)');
new HSV(0, 1, 1);
new HSV(0xff0000);
new HSV('#ff0000');
new HSV('rgb(255, 0, 0)');
foo.style.color = (new RGB(255, 0, 0)).toCSSString();
bar.style.color = (new HSV(0, 1, 1)).toCSSString();
@minodisk
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment