diff options
Diffstat (limited to 'js/color.js')
| -rw-r--r-- | js/color.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/js/color.js b/js/color.js index 34404cd..d51bb67 100644 --- a/js/color.js +++ b/js/color.js @@ -4,6 +4,9 @@ function rgb(x,y,z){ if (x.length) { r=x[0]; g=x[1]; b =x[2]; } else { r=x; g=y; b=z } } +function black(){ rgb(0,0,0) } +function white(){ rgb(255,255,255) } +function red(){ rgb(255,0,0) } function rgb2xyz(rgb){ var var_R = ( rgb[0] / 255 ) //R from 0 to 255 |
