Color Ramp
20 nodes
On this page 20
Default Heat Ramp
FunctionFive-stop heat-map ramp on 0-1, running dark blue, blue, green, yellow, red.
DefaultHeatRamp() -> Color Ramp
ColorRamp DefaultHeatRamp()
Returns
| result | Color Ramp |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Default Terrain Ramp
FunctionSeven-stop terrain ramp on 0-1: deep water, shallow water, sand, grass, brown earth, grey rock and snow.
DefaultTerrainRamp() -> Color Ramp
ColorRamp DefaultTerrainRamp()
Returns
| result | Color Ramp |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Natural Cool
FunctionNine-stop ramp on 0-1 of muted natural tones, from near-black green through olive and brown to pale sand, with cooler greens in the shadows than ColorRamp.NaturalDirt.
NaturalCool() -> Color Ramp
ColorRamp NaturalCool()
Returns
| result | Color Ramp |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Natural Dirt
FunctionNine-stop ramp on 0-1 of earthy tones, from near-black through olive and brown to pale sand; a slightly warmer variant of ColorRamp.NaturalCool.
NaturalDirt() -> Color Ramp
ColorRamp NaturalDirt()
Returns
| result | Color Ramp |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Make Color Ramp
FunctionCreates a ramp from stops given in any order; they are sorted by position.
Overload 1 of 2
ColorRamp(stops: IEnumerable<Color Stop>) -> Color Ramp
ColorRamp ColorRamp(IEnumerable<ColorStop> stops)
Parameters
| name | type | default | description |
|---|---|---|---|
| stops | IEnumerable<Color Stop> | — | The stops. At least one is required, positions must be finite, and no two may share a position. |
Returns
| result | Color Ramp |
Overload 2 of 2
ColorRamp(stops: Color Stop Array) -> Color Ramp
ColorRamp ColorRamp(params ColorStop[] stops)
Parameters
| name | type | default | description |
|---|---|---|---|
| stops | Color Stop Array | — | The stops. At least one is required, positions must be finite, and no two may share a position. |
Returns
| result | Color Ramp |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Count
FunctionNumber of stops; always at least one.
Count(Color Ramp: Color Ramp) -> Integer
int Count(ColorRamp Color Ramp)
Parameters
| name | type | default | description |
|---|---|---|---|
| Color Ramp | Color Ramp | — |
Returns
| result | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Domain End
FunctionPosition of the last (highest) stop.
DomainEnd(Color Ramp: Color Ramp) -> Number
double DomainEnd(ColorRamp Color Ramp)
Parameters
| name | type | default | description |
|---|---|---|---|
| Color Ramp | Color Ramp | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Domain Length
FunctionDistance from the first stop to the last; zero for a single-stop ramp.
DomainLength(Color Ramp: Color Ramp) -> Number
double DomainLength(ColorRamp Color Ramp)
Parameters
| name | type | default | description |
|---|---|---|---|
| Color Ramp | Color Ramp | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Domain Start
FunctionPosition of the first (lowest) stop.
DomainStart(Color Ramp: Color Ramp) -> Number
double DomainStart(ColorRamp Color Ramp)
Parameters
| name | type | default | description |
|---|---|---|---|
| Color Ramp | Color Ramp | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Is Normalized
FunctionTrue when the stops run exactly from 0 to 1.
IsNormalized(Color Ramp: Color Ramp) -> Truth
bool IsNormalized(ColorRamp Color Ramp)
Parameters
| name | type | default | description |
|---|---|---|---|
| Color Ramp | Color Ramp | — |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Item
FunctionThe stop at the given index, counting in ascending order of position.
Item(Color Ramp: Color Ramp, index: Integer) -> Color Stop
ColorStop Item(ColorRamp Color Ramp, int index)
Parameters
| name | type | default | description |
|---|---|---|---|
| Color Ramp | Color Ramp | — | |
| index | Integer | — | Zero-based index of the stop. |
Returns
| result | Color Stop |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Stops
FunctionThe stops, sorted by ascending position.
Stops(Color Ramp: Color Ramp) -> IReadOnlyList<Color Stop>
IReadOnlyList<ColorStop> Stops(ColorRamp Color Ramp)
Parameters
| name | type | default | description |
|---|---|---|---|
| Color Ramp | Color Ramp | — |
Returns
| result | IReadOnlyList<Color Stop> |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Get Enumerator
FunctionEnumerates the stops in ascending order of position.
GetEnumerator(Color Ramp: Color Ramp) -> IEnumerator<Color Stop>
IEnumerator<ColorStop> GetEnumerator(ColorRamp Color Ramp)
Parameters
| name | type | default | description |
|---|---|---|---|
| Color Ramp | Color Ramp | — |
Returns
| result | IEnumerator<Color Stop> |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
To String
FunctionWrites the ramp as text in the ColorRampTextStyle.ColorAtStop style, one stop per line, which ColorRamp.Parse reads back.
ToString(Color Ramp: Color Ramp) -> Text
string ToString(ColorRamp Color Ramp)
Parameters
| name | type | default | description |
|---|---|---|---|
| Color Ramp | Color Ramp | — |
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
To Text
FunctionConvert color ramp to parsable text format.
ToText -> Text
Color Ramp: Color Ramp
style: Color Ramp Text Stylestring ToText(
ColorRamp Color Ramp,
ColorRamp.ColorRampTextStyle style = ColorRampTextStyle.ColorAtStop)Parameters
| name | type | default | description |
|---|---|---|---|
| Color Ramp | Color Ramp | — | |
| style | Color Ramp Text Style | Color at stop |
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Create Default Water Surface Color Ramp
FunctionDefault water-like ramp for normal-shaded heightfield rendering.
CreateDefaultWaterSurfaceColorRamp() -> Color Ramp
ColorRamp CreateDefaultWaterSurfaceColorRamp()
Returns
| result | Color Ramp |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Create Shallow Water Surface Color Ramp
FunctionShallow water-like ramp for normal-shaded heightfield rendering.
CreateShallowWaterSurfaceColorRamp() -> Color Ramp
ColorRamp CreateShallowWaterSurfaceColorRamp()
Returns
| result | Color Ramp |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Default Height Level Color Ramps
FunctionA reasonable stylized 2D-ish default:
deep ocean -> shallow -> beach -> green -> dry grass -> brown -> rock -> snow.
seaLevel shifts the water/land boundary.
DefaultHeightLevelColorRamps(seaLevel: Low Accuracy Number) -> Color Ramp
ColorRamp DefaultHeightLevelColorRamps(float seaLevel)
Parameters
| name | type | default | description |
|---|---|---|---|
| seaLevel | Low Accuracy Number | — |
Returns
| result | Color Ramp |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Parse
FunctionParses line-based color ramp text.
Supported formats:
#RRGGBB@0.25
0.25: #RRGGBB
Parse(text: Text) -> Color Ramp
ColorRamp Parse(string text)
Parameters
| name | type | default | description |
|---|---|---|---|
| text | Text | — |
Returns
| result | Color Ramp |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing
Try Parse
FunctionParses ramp text in the same formats as ColorRamp.Parse, returning false instead of throwing when the text is empty, malformed or describes an invalid ramp.
TryParse(text: Text) -> (result: Truth, ramp: Color Ramp)
bool TryParse(string text, out ColorRamp ramp)
Parameters
| name | type | default | description |
|---|---|---|---|
| text | Text | — | The text to parse. |
Returns
| result | Truth |
| ramp | Color Ramp |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Color Ramp
- Package
- Image Processing