MCPcopy
hub / github.com/RaspberryPiFoundation/blockly / setColour

Method setColour

packages/blockly/core/block.ts:1088–1092  ·  view source on GitHub ↗

* Change the colour of a block. * * @param colour HSV hue value (0 to 360), #RRGGBB string, or a message * reference string pointing to one of those two values.

(colour: number | string)

Source from the content-addressed store, hash-verified

1086 * reference string pointing to one of those two values.
1087 */
1088 setColour(colour: number | string) {
1089 const parsed = parsing.parseBlockColour(colour);
1090 this.hue = parsed.hue;
1091 this.colour_ = parsed.hex;
1092 }
1093
1094 /**
1095 * Set the style and colour values of a block.

Callers 10

jsonInitColourMethod · 0.95
showEditor_Method · 0.45
applyColourMethod · 0.45
applyColourMethod · 0.45
applyColourMethod · 0.45
block_test.jsFile · 0.45
icon_test.jsFile · 0.45
unittest.jsFile · 0.45
blocks.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected