Motion
Get Motion

ReferenceScripting APIMotionColour

MotionColour

interface

Colour for code (scene.colour, or import { colour } from "motion"): colours are "#rrggbb".

NameMotionColour
Kindinterface
Script reaches it ascolour, or import { colour } from "motion" · MotionScene.colour · motion.colour
Since0.4

Syntax

interface MotionColour { … }declare const colour: MotionColour;

Methods

SignatureDescription
mix(a: string, b: string, t: number): stringmethodBetween two colours, t of the way.
fromHsv(h: number, s: number, v: number): stringmethodA colour from its hue, saturation and value.
toHsv(c: string): [number, number, number]methodA colour's hue, saturation and value, 0 to 1 each.
lighten(c: string, k: number): stringmethodToward white or black.
saturate(c: string, k: number): stringmethodMore colourful, or greyer.
opposite(c: string): stringmethodIts opposite round the colour wheel.
fromKelvin(kelvin: number): stringmethodThe colour of light at a temperature.