Template:Team:UC Davis/MutantWidget

From 2011.igem.org

(Difference between revisions)
Line 93: Line 93:
highcolor = RGB2HSL(colormap[highval][0], colormap[highval][1], colormap[highval][2]);
highcolor = RGB2HSL(colormap[highval][0], colormap[highval][1], colormap[highval][2]);
var h = lowcolor.h*(highval - newval) + highcolor.h*(newval - lowval);
var h = lowcolor.h*(highval - newval) + highcolor.h*(newval - lowval);
-
var s = lowcolor.s*(highval - newval) + highcolor.s*(newval - lowval);
+
// var s = lowcolor.s*(highval - newval) + highcolor.s*(newval - lowval);
-
var v = lowcolor.l*(highval - newval) + highcolor.l*(newval - lowval);
+
// var v = lowcolor.l*(highval - newval) + highcolor.l*(newval - lowval);
 +
s = lowcolor.s;
 +
v = lowcolor.v;
newcolor = HSL2RGB(h,s,v);
newcolor = HSL2RGB(h,s,v);
/*
/*

Revision as of 03:58, 25 September 2011