Divooka Reference

Color Ramp

20 nodes

On this page 20

Default Heat Ramp

Function

Five-stop heat-map ramp on 0-1, running dark blue, blue, green, yellow, red.

Signature
DefaultHeatRamp() -> Color Ramp
ColorRamp DefaultHeatRamp()

Returns

resultColor Ramp
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Color Ramp
Package
Image Processing

Default Terrain Ramp

Function

Seven-stop terrain ramp on 0-1: deep water, shallow water, sand, grass, brown earth, grey rock and snow.

Signature
DefaultTerrainRamp() -> Color Ramp
ColorRamp DefaultTerrainRamp()

Returns

resultColor Ramp
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Color Ramp
Package
Image Processing

Natural Cool

Function

Nine-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.

Signature
NaturalCool() -> Color Ramp
ColorRamp NaturalCool()

Returns

resultColor Ramp
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Color Ramp
Package
Image Processing

Natural Dirt

Function

Nine-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.

Signature
NaturalDirt() -> Color Ramp
ColorRamp NaturalDirt()

Returns

resultColor Ramp
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Color Ramp
Package
Image Processing

Make Color Ramp

Function

Creates a ramp from stops given in any order; they are sorted by position.

Overload 1 of 2

Signature
ColorRamp(stops: IEnumerable<Color Stop>) -> Color Ramp
ColorRamp ColorRamp(IEnumerable<ColorStop> stops)

Parameters

nametypedefaultdescription
stopsIEnumerable<Color Stop>—The stops. At least one is required, positions must be finite, and no two may share a position.

Returns

resultColor Ramp

Overload 2 of 2

Signature
ColorRamp(stops: Color Stop Array) -> Color Ramp
ColorRamp ColorRamp(params ColorStop[] stops)

Parameters

nametypedefaultdescription
stopsColor Stop Array—The stops. At least one is required, positions must be finite, and no two may share a position.

Returns

resultColor Ramp
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Color Ramp
Package
Image Processing

Count

Function

Number of stops; always at least one.

Signature
Count(Color Ramp: Color Ramp) -> Integer
int Count(ColorRamp Color Ramp)

Parameters

nametypedefaultdescription
Color RampColor Ramp—

Returns

resultInteger
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Color Ramp
Package
Image Processing

Domain End

Function

Position of the last (highest) stop.

Signature
DomainEnd(Color Ramp: Color Ramp) -> Number
double DomainEnd(ColorRamp Color Ramp)

Parameters

nametypedefaultdescription
Color RampColor Ramp—

Returns

resultNumber
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Color Ramp
Package
Image Processing

Domain Length

Function

Distance from the first stop to the last; zero for a single-stop ramp.

Signature
DomainLength(Color Ramp: Color Ramp) -> Number
double DomainLength(ColorRamp Color Ramp)

Parameters

nametypedefaultdescription
Color RampColor Ramp—

Returns

resultNumber
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Color Ramp
Package
Image Processing

Domain Start

Function

Position of the first (lowest) stop.

Signature
DomainStart(Color Ramp: Color Ramp) -> Number
double DomainStart(ColorRamp Color Ramp)

Parameters

nametypedefaultdescription
Color RampColor Ramp—

Returns

resultNumber
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Color Ramp
Package
Image Processing

Is Normalized

Function

True when the stops run exactly from 0 to 1.

Signature
IsNormalized(Color Ramp: Color Ramp) -> Truth
bool IsNormalized(ColorRamp Color Ramp)

Parameters

nametypedefaultdescription
Color RampColor Ramp—

Returns

resultTruth
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Color Ramp
Package
Image Processing

Item

Function

The stop at the given index, counting in ascending order of position.

Signature
Item(Color Ramp: Color Ramp, index: Integer) -> Color Stop
ColorStop Item(ColorRamp Color Ramp, int index)

Parameters

nametypedefaultdescription
Color RampColor Ramp—
indexInteger—Zero-based index of the stop.

Returns

resultColor Stop
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Color Ramp
Package
Image Processing

Stops

Function

The stops, sorted by ascending position.

Signature
Stops(Color Ramp: Color Ramp) -> IReadOnlyList<Color Stop>
IReadOnlyList<ColorStop> Stops(ColorRamp Color Ramp)

Parameters

nametypedefaultdescription
Color RampColor Ramp—

Returns

resultIReadOnlyList<Color Stop>
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Color Ramp
Package
Image Processing

Get Enumerator

Function

Enumerates the stops in ascending order of position.

Signature
GetEnumerator(Color Ramp: Color Ramp) -> IEnumerator<Color Stop>
IEnumerator<ColorStop> GetEnumerator(ColorRamp Color Ramp)

Parameters

nametypedefaultdescription
Color RampColor Ramp—

Returns

resultIEnumerator<Color Stop>
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Color Ramp
Package
Image Processing

To String

Function

Writes the ramp as text in the ColorRampTextStyle.ColorAtStop style, one stop per line, which ColorRamp.Parse reads back.

Signature
ToString(Color Ramp: Color Ramp) -> Text
string ToString(ColorRamp Color Ramp)

Parameters

nametypedefaultdescription
Color RampColor Ramp—

Returns

resultText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Color Ramp
Package
Image Processing

To Text

Function

Convert color ramp to parsable text format.

Signature
ToText -> Text
    Color Ramp: Color Ramp
    style: Color Ramp Text Style
string ToText(
    ColorRamp Color Ramp,
    ColorRamp.ColorRampTextStyle style = ColorRampTextStyle.ColorAtStop)

Parameters

nametypedefaultdescription
Color RampColor Ramp—
styleColor Ramp Text StyleColor at stop

Returns

resultText
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

Function

Default water-like ramp for normal-shaded heightfield rendering.

Signature
CreateDefaultWaterSurfaceColorRamp() -> Color Ramp
ColorRamp CreateDefaultWaterSurfaceColorRamp()

Returns

resultColor 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

Function

Shallow water-like ramp for normal-shaded heightfield rendering.

Signature
CreateShallowWaterSurfaceColorRamp() -> Color Ramp
ColorRamp CreateShallowWaterSurfaceColorRamp()

Returns

resultColor 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

Function

A reasonable stylized 2D-ish default:
deep ocean -> shallow -> beach -> green -> dry grass -> brown -> rock -> snow.
seaLevel shifts the water/land boundary.

Signature
DefaultHeightLevelColorRamps(seaLevel: Low Accuracy Number) -> Color Ramp
ColorRamp DefaultHeightLevelColorRamps(float seaLevel)

Parameters

nametypedefaultdescription
seaLevelLow Accuracy Number—

Returns

resultColor Ramp
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Color Ramp
Package
Image Processing

Parse

Function

Parses line-based color ramp text.
Supported formats:
#RRGGBB@0.25
0.25: #RRGGBB

Signature
Parse(text: Text) -> Color Ramp
ColorRamp Parse(string text)

Parameters

nametypedefaultdescription
textText—

Returns

resultColor Ramp
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Color Ramp
Package
Image Processing

Try Parse

Function

Parses 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.

Signature
TryParse(text: Text) -> (result: Truth, ramp: Color Ramp)
bool TryParse(string text, out ColorRamp ramp)

Parameters

nametypedefaultdescription
textText—The text to parse.

Returns

resultTruth
rampColor Ramp
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Color Ramp
Package
Image Processing