ColorRamp(bpy_struct)

base class — bpy_struct

class bpy.types.ColorRamp(bpy_struct)

Color ramp mapping a scalar value to a color

color_mode

Set color mode to use for interpolation (default 'RGB')

Type:

Literal[‘RGB’, ‘HSV’, ‘HSL’]

elements

(default None, readonly)

Type:

ColorRampElements[ColorRampElement]

hue_interpolation

Set color interpolation (default 'NEAR')

Type:

Literal[‘NEAR’, ‘FAR’, ‘CW’, ‘CCW’]

interpolation

Set interpolation between color stops (default 'LINEAR')

Type:

Literal[‘EASE’, ‘CARDINAL’, ‘LINEAR’, ‘B_SPLINE’, ‘CONSTANT’]

evaluate(position)

Evaluate Color Ramp

Parameters:

position (float) – Position, Evaluate Color Ramp at position (in [0, 1])

Returns:

Color, Color at given position (array of 4 items, in [-inf, inf])

Return type:

bpy_prop_array[float]

classmethod bl_rna_get_subclass(id, default=None, /)
Parameters:
  • id (str) – The RNA type identifier.

  • default (bpy.types.Struct | None) – The value to return when not found.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct

classmethod bl_rna_get_subclass_py(id, default=None, /)
Parameters:
  • id (str) – The RNA type identifier.

  • default (type | None) – The value to return when not found.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties

Inherited Functions

References