ColorTween
Defined in: src/anim/tween.ts:118
A Tween for CSS colours. Drives an internal 0→1 progress and
interpolates each channel, returning an rgb(...) string. Endpoints may be
hex, rgb(), or a basic colour name.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ColorTween(
initial):ColorTween
Defined in: src/anim/tween.ts:123
Parameters
Section titled “Parameters”initial
Section titled “initial”string
Returns
Section titled “Returns”ColorTween
Accessors
Section titled “Accessors”animating
Section titled “animating”Get Signature
Section titled “Get Signature”get animating():
boolean
Defined in: src/anim/tween.ts:159
True while the color is still changing.
Returns
Section titled “Returns”boolean
Get Signature
Section titled “Get Signature”get goal():
string
Defined in: src/anim/tween.ts:147
The color this tween is moving toward.
Returns
Section titled “Returns”string
Get Signature
Section titled “Get Signature”get value():
string
Defined in: src/anim/tween.ts:152
The interpolated rgb(...) color at the present clock.
Returns
Section titled “Returns”string
Methods
Section titled “Methods”set(
value):void
Defined in: src/anim/tween.ts:140
Jump straight to value with no motion.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
to(
target,opts?):void
Defined in: src/anim/tween.ts:130
Aim at a new target color, interpolating from the one shown now.
Parameters
Section titled “Parameters”target
Section titled “target”string
TweenOptions = {}
Returns
Section titled “Returns”void