Color
6 nodes
On this page 6
Brightness
FunctionAdjusts a colour's dark, middle and bright tones: shadows lift the darks, highlights scale the brights, and midtones bend the curve between them.
Signature
Brightness -> Hdr Color Element
color: Hdr Color Element
shadows: Number
midtones: Number
highlights: NumberHdrColorElement Brightness(
HdrColorElement color,
double shadows = 0,
double midtones = 0,
double highlights = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| color | Hdr Color Element | — | The colour. |
| shadows | Number | 0 | Lifts dark tones toward white: 0 is unchanged, 1 makes black white. |
| midtones | Number | 0 | Brightens middle tones when above 0, darkens them below. |
| highlights | Number | 0 | Scales bright tones: 0 is unchanged, 1 doubles them. |
Returns
| Color | Hdr Color Element |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color
- Package
- GPU Kernels
Color From Values
FunctionA colour from its red, green, blue and opacity, each from 0 to 1.
Signature
ColorFromValues -> Hdr Color Element
red: Number
green: Number
blue: Number
alpha: NumberHdrColorElement ColorFromValues(
double red,
double green,
double blue,
double alpha = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| red | Number | — | Red, from 0 to 1. |
| green | Number | — | Green, from 0 to 1. |
| blue | Number | — | Blue, from 0 to 1. |
| alpha | Number | 1 | Opacity, from 0 to 1. |
Returns
| Color | Hdr Color Element |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color
- Package
- GPU Kernels
Color Ramp
FunctionMaps a value onto a ramp of colours, any number of stops along it: between two stops the colour is blended from theirs, before the first stop it is the first stop's, and after the last it is the last stop's.
Signature
ColorRamp(value: Number, ramp: Text) -> Hdr Color Element
HdrColorElement ColorRamp(
double value,
string ramp = "0 #000000; 1 #FFFFFF")Parameters
| name | type | default | description |
|---|---|---|---|
| value | Number | — | The value. |
| ramp | Text | 0 #000000; 1 #FFFFFF | The ramp, stop by stop, each a position and a colour: 0 #000000; 1 #FFFFFF is black at 0 to white at 1. |
Returns
| Color | Hdr Color Element |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color
- Package
- GPU Kernels
Grey
FunctionA grey of a value: the value in red, green and blue, fully opaque.
Signature
Grey(value: Number) -> Hdr Color Element
HdrColorElement Grey(double value)
Parameters
| name | type | default | description |
|---|---|---|---|
| value | Number | — | The grey level, from 0 for black to 1 for white. |
Returns
| Color | Hdr Color Element |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color
- Package
- GPU Kernels
HSL Adjustments
FunctionAdjusts a colour's hue, saturation and lightness.
Signature
HslAdjustments -> Hdr Color Element
color: Hdr Color Element
shift: Number
saturation: Number
lightness: NumberHdrColorElement HslAdjustments(
HdrColorElement color,
double shift = 0,
double saturation = 1,
double lightness = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| color | Hdr Color Element | — | The colour. |
| shift | Number | 0 | How far round the colour wheel to turn the hue, in turns: 0.5 is the opposite colour. |
| saturation | Number | 1 | Multiplies the saturation: 0 is grey, 1 is unchanged. |
| lightness | Number | 1 | Multiplies the lightness: 0 is black, 1 is unchanged. |
Returns
| Color | Hdr Color Element |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color
- Package
- GPU Kernels
Mix Colors
FunctionBlends from one colour to another: 0 gives the first, 1 the second.
Signature
MixColors -> Hdr Color Element
from: Hdr Color Element
to: Hdr Color Element
amount: NumberHdrColorElement MixColors(
HdrColorElement from,
HdrColorElement to,
double amount)Parameters
| name | type | default | description |
|---|---|---|---|
| from | Hdr Color Element | — | The colour at 0. |
| to | Hdr Color Element | — | The colour at 1. |
| amount | Number | — | How far to blend, normally from 0 to 1. |
Returns
| Color | Hdr Color Element |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color
- Package
- GPU Kernels