colourToneCss

Converts a colour attribute value to the CSS for its hue at another tone, so blue at light gives var(--blue-pale).

@internote/canvas-sdkFunction
On this page
import { colourToneCss } from '@internote/canvas-sdk';

What a value-mapped surface paints with: a hue names its whole scale there, so the mark needs both ends of it rather than the one token colourCss would give. Anything without a scale, the neutral or a literal, comes back as fallback.

#Signature

(value: unknown, tone: Tone, fallback?: string): string

#Parameters

value
A colour attribute value.
tone
The shade wanted.
fallback
What to return for a value with no scale.

Declared in packages/canvas-sdk/src/paint/colour.ts:228.

Last updated