blockly > blockRendering > ConstantProvider > getBlockStyleForColour

blockRendering.ConstantProvider.getBlockStyleForColour() method

Get or create a block style based on a single colour value. Generate a name for the style based on the colour.


getBlockStyleForColour(colour: string): {
        style: BlockStyle;
        name: string;


Parameter Type Description
colour string #RRGGBB colour string.


{ style: BlockStyle; name: string; }

An object containing the style and an autogenerated name for that style.