summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorjules <jules@okfoc.us>2014-01-07 00:09:50 -0500
committerjules <jules@okfoc.us>2014-01-07 00:09:50 -0500
commit981269960b6d8ce4b8c6e4da7f5979e2f7eea231 (patch)
tree60d3d3b8d9d227a7b2340390a95b6e2cf00a1bf2 /js
parent7d4ab95905b095b60a1fc0fcae7ba250705622cf (diff)
black() white() red()
Diffstat (limited to 'js')
-rw-r--r--js/color.js3
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