FACT++
1.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
color.js
Go to the documentation of this file.
1
function
hueToRGB
(hue)
2
{
3
hue /= 3;
4
hue %= 6;
5
6
if
(hue<1)
return
parseInt(255*hue);
7
if
(hue<3)
return
parseInt(255);
8
if
(hue<4)
return
parseInt(255*(4-hue));
9
10
return
0.
11
}
12
13
function
hueToHex
(flt)
14
{
15
var
s =
hueToRGB
(flt).toString(16);
16
return
s.length==2 ? s :
"0"
+s;
17
}
18
19
function
HLStoRGB
(hue)
20
{
21
hue *= 14;
22
23
var
sr =
hueToHex
(20-hue);
24
var
sg =
hueToHex
(14-hue);
25
var
sb =
hueToHex
(26-hue);
26
27
return
sr+sg+sb;
28
}
29
30
31
function
color
(col)
32
{
33
if
(col==65533)
34
col = 0;
35
36
var
hue = col/128;
37
return
HLStoRGB
(hue);
38
}
var
po::typed_value< T > * var(T *ptr=0)
Definition:
Configuration.h:254
hueToHex
function hueToHex(flt)
Definition:
color.js:13
HLStoRGB
function HLStoRGB(hue)
Definition:
color.js:19
hueToRGB
function hueToRGB(hue)
Definition:
color.js:1
color
function color(col)
Definition:
color.js:31
www~
color.js
Generated on Sun Sep 18 2016 20:50:25 for FACT++ by
1.8.11