Stay organized with collections Save and categorize content based on your preferences.

blockly > FieldColour > setColours

FieldColour.setColours() method

Set a custom colour grid for this field.

Signature:

setColours(colours: string[], opt_titles?: string[]): FieldColour;

Parameters

Parameter Type Description
colours string[] Array of colours for this block, or null to use default (FieldColour.COLOURS).
opt_titles string[] (Optional) Optional array of colour tooltips, or null to use default (FieldColour.TITLES).

Returns:

FieldColour

Returns itself (for method chaining).