Skip to Content

@revideo/core


@revideo/core / types / Color

Class: Color

Defined in: types/Color.ts:62 

Represents a color using RGBA values (0-1 range).

Implements

Constructors

Constructor

new Color(value?): Color

Defined in: types/Color.ts:71 

Parameters

value?

PossibleColor

Returns

Color

Properties

a

readonly a: number

Defined in: types/Color.ts:69 


b

readonly b: number

Defined in: types/Color.ts:68 


g

readonly g: number

Defined in: types/Color.ts:67 


r

readonly r: number

Defined in: types/Color.ts:66 


symbol

readonly symbol: symbol = Color.symbol

Defined in: types/Color.ts:64 


symbol

static symbol: symbol

Defined in: types/Color.ts:63 

Methods

alpha()

alpha(): number

Defined in: types/Color.ts:264 

Returns the alpha value of the color (0-1 range).

Returns

number


css()

css(): string

Defined in: types/Color.ts:254 

Serializes the color to an rgb() CSS string (omitting alpha).

Returns

string


hex()

hex(): string

Defined in: types/Color.ts:271 

Serializes the color to an RRGGBBAA hex string using culori.

Returns

string


lerp()

lerp(to, value, mode?): Color

Defined in: types/Color.ts:285 

Linearly interpolates from this color to another using LCH space.

Parameters

to

PossibleColor

value

number

mode?

CuloriInterpolatorMode = 'lch'

Returns

Color


serialize()

serialize(): string

Defined in: types/Color.ts:242 

Serializes the color to an rgba() CSS string.

Returns

string


toSymbol()

toSymbol(): symbol

Defined in: types/Color.ts:221 

Returns

symbol

Implementation of

Type.toSymbol


toUniform()

toUniform(gl, location): void

Defined in: types/Color.ts:232 

Parameters

gl

WebGL2RenderingContext

location

WebGLUniformLocation

Returns

void

Implementation of

WebGLConvertible.toUniform


createLerp()

static createLerp(mode?): InterpolationFunction<Color, any[]>

Defined in: types/Color.ts:199 

Creates an interpolation function for colors (uses LCH space via culori).

Parameters

mode?

CuloriInterpolatorMode = 'lch'

Returns

InterpolationFunction<Color, any[]>


createSignal()

static createSignal(initial?, interpolation?): ColorSignal<void>

Defined in: types/Color.ts:209 

Creates a signal for the Color type.

Parameters

initial?

SignalValue<PossibleColor>

interpolation?

InterpolationFunction<Color> = Color.lerp

Returns

ColorSignal<void>


lerp()

static lerp(from, to, value, mode?): Color

Defined in: types/Color.ts:141 

Interpolates between two colors using LCH color space.

Parameters

from

PossibleColor | null

to

PossibleColor | null

value

number

mode?

CuloriInterpolatorMode = 'lch'

Returns

Color

© 2026 Haven Technologies, Inc.
Class: Color – Revideo