new $color(number, specificopt)
- Description:
- Creates a color from a number
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
number |
number | Color ID | ||
specific |
boolean |
<optional> |
true
|
Whether to disallow G.js from using that specific color again |
Methods
copy(c, durationopt, hvsopt, blendingopt, opacityopt, copy_opacityopt)
- Description:
- Copy a color channel to another
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
c |
color | Color channel to be copied | ||
duration |
number |
<optional> |
0
|
Duration of color change |
hvs |
string |
<optional> |
"0a1a1a0a0"
|
HVS color to copy |
blending |
boolean |
<optional> |
false
|
Toggle blending on color |
opacity |
number |
<optional> |
1
|
Channel opacity |
copy_opacity |
boolean |
<optional> |
false
|
Copy target opacity |
pulse(color, fade_inopt, holdopt, fade_outopt, exclusiveopt)
- Description:
- Pulses color
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
color |
array | RGB color to pulse | ||
fade_in |
number |
<optional> |
0
|
Fade in |
hold |
number |
<optional> |
0
|
Hold |
fade_out |
number |
<optional> |
0
|
Fade out |
exclusive |
number |
<optional> |
false
|
Whether to prioritize over simultaneous pulses |
pulse_hsv(h, s, b, s_checkedopt, b_checkedopt, fade_inopt, holdopt, fade_outopt, exclusiveopt)
- Description:
- Pulses color w/ HSV
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
h |
number | Hue | ||
s |
number | Saturation | ||
b |
number | Brightness | ||
s_checked |
boolean |
<optional> |
false
|
Saturation is checked |
b_checked |
boolean |
<optional> |
false
|
Brightness is checked |
fade_in |
number |
<optional> |
0
|
Fade in |
hold |
number |
<optional> |
0
|
Hold |
fade_out |
number |
<optional> |
0
|
Fade out |
exclusive |
number |
<optional> |
false
|
Whether to prioritize over simultaneous pulses |
set(c, durationopt, blendingopt)
- Description:
- Sets color to RGB value
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
c |
array | RGB value | ||
duration |
number |
<optional> |
0
|
How long it takes for color to change |
blending |
boolean |
<optional> |
false
|
Whether to make color blending |