My Recent Pastes (533 and counting)
Pastes by Jacob Rus (533 and counting)
Below are the 15 most recent pasties by Jacob Rus.
September 25, 2010
2:11PM EDT
by Jacob Rus
View all 182 lines
/*
Simple HSL<-->RGB and HSV<-->RGB conversions, by Jacob Rus
These assume that hue angle H is expressed in degrees [0, 360),
while all attributes (R, G, S, &c.) are in the range [0, 1].
September 25, 2010
2:10PM EDT
by Jacob Rus
View all 182 lines
/*
Simple HSL<-->RGB and HSV<-->RGB conversions, by Jacob Rus
These assume that hue angle H is expressed in degrees [0, 360),
while all attributes (R, G, S, &c.) are in the range [0, 1].
September 24, 2010
3:25AM EDT
by Jacob Rus
View all 182 lines
/*
Simple HSL<-->RGB and HSV<-->RGB conversions, by Jacob Rus
These assume that hue angle H is expressed in degrees [0, 360),
while all attributes (R, G, S, &c.) are in the range [0, 1].
September 24, 2010
2:44AM EDT
by Jacob Rus
View all 182 lines
/*
Simple HSL<-->RGB and HSV<-->RGB conversions, by Jacob Rus
These assume that hue angle H is expressed in degrees [0, 360),
while all attributes (R, G, S, &c.) are in the range [0, 1].
September 24, 2010
2:43AM EDT
by Jacob Rus
View all 182 lines
/*
Simple HSL<-->RGB and HSV<-->RGB conversions, by Jacob Rus
These assume that hue angle H is expressed in degrees [0, 360),
while all attributes (R, G, S, &c.) are in the range [0, 1].
September 23, 2010
6:08PM EDT
by Jacob Rus
View all 184 lines
/*
Simple HSL<-->RGB and HSV<-->RGB conversions, by Jacob Rus
These assume that hue angle H is expressed in degrees [0, 360),
while all attributes (R, G, S, &c.) are in the range [0, 1].
September 23, 2010
6:06PM EDT
by Jacob Rus
View all 184 lines
/*
Simple HSL<-->RGB and HSV<-->RGB conversions, by Jacob Rus
These assume that hue angle H is expressed in degrees [0, 360),
while all attributes (R, G, S, &c.) are in the range [0, 1].
September 23, 2010
5:29PM EDT
by Jacob Rus
View all 155 lines
/*
Simple HSL<-->RGB and HSV<-->RGB conversions, by Jacob Rus
These assume that hue angle H is expressed in degrees [0, 360),
while all attributes (R, G, S, &c.) are in the range [0, 1].
September 23, 2010
5:16PM EDT
by Jacob Rus
View all 112 lines
/*
Simple HSL<-->RGB and HSV<-->RGB conversions, by Jacob Rus
These assume that hue angle H is expressed in degrees [0, 360),
while and all attributes (R, G, S, &c.) are in the range [0, 1]
September 23, 2010
5:11PM EDT
by Jacob Rus
View all 112 lines
/*
Simple HSL<-->RGB and HSV<-->RGB conversions, by Jacob Rus
These assume that hue angle H is expressed in degrees [0, 360),
while and all attributes (R, G, S, &c.) are in the range [0, 1]
September 23, 2010
2:47PM EDT
by Jacob Rus
H = (C == 0 ? null : V == R ? (G - B) / C : V == G ? (B - R) / C + 2 : (R - G) / C + 4);
September 23, 2010
2:32PM EDT
by Jacob Rus
View all 95 lines
var hsl2rgb = function (H, S, L) { // H expressed in degrees, S and L in range [0, 1] // Outputs R, G, and B in range [0, 1] // See Wikipedia for explanation of the algorithm.
September 23, 2010
2:26PM EDT
by Jacob Rus
View all 95 lines
var hsl2rgb = function (H, S, L) { // H expressed in degrees, S and L in range [0, 1] // Outputs R, G, and B in range [0, 1] // See Wikipedia for explanation of the algorithm.
September 23, 2010
2:28AM EDT
by Jacob Rus
View all 47 lines
var hsl2rgb = function (H, S, L) { // H expressed in degrees, S and L in range [0, 1] // See Wikipedia for explanation of the algorithm. if (!(0 <= L <= 1) || !(0 <= S <= 1))
September 23, 2010
2:17AM EDT
by Jacob Rus
View all 23 lines
var hsl2rgb = function (H, S, L) { // H expressed in degrees, S and L in range [0, 1] // See Wikipedia for explanation of the algorithm. if (!(0 <= L <= 1) || !(0 <= S <= 1))