Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

Gradient

Inherits: Resource < RefCounted < Object

A color transition.

Description

This resource describes a color transition by defining a set of colored points and how to interpolate between them.

See also Curve which supports more complex easing methods, but does not support colors.

Properties

PackedColorArray

colors

PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1)

ColorSpace

interpolation_color_space

0

InterpolationMode

interpolation_mode

0

PackedFloat32Array

offsets

PackedFloat32Array(0, 1)

Methods

void

add_point ( float offset, Color color )

Color

get_color ( int point )

float

get_offset ( int point )

int

get_point_count ( ) const

void

remove_point ( int point )

void

reverse ( )

Color

sample (