colourValue
Refines a paint attribute value, storing it in its canonical spelling or refusing it with a message listing the colours allowed.
@internote/canvas-sdkOn this page
import { colourValue } from '@internote/canvas-sdk';Accepts every name in COLOUR_NAMES and the hex(…) and rgb(…) literals. What reads an animatable colour, which reaches the refiners as text; a colour the compiler typed arrives already checked.
#Signature
(input: string): RefineResult#Parameters
inputThe value as written.
Declared in packages/canvas-sdk/src/refine/value-refiners.ts:612.