bdeSetBlockBackgroundColor
Sets the background color of block. Can use either a string for color or four separate rgba values. When using rgba values, values range from 0 to 255.
Syntax
bdeSetBlockBackgroundColor(block, color)
bdeSetBlockBackgroundColor(block, red, green, blue, alpha)
Inputs
- block
- The block to set the background color of.
- color
- Color to set the block's background color to.
- red
- Value to set the block's red color value to. Values range from 0-255.
- green
- Value to set the block's green color value to. Values range from 0-255.
- blue
- Value to set the block's blue color value to. Values range from 0-255.
- alpha
- Transparency to set the block's background color to. Values range from 0-255.
Examples
diagram = bdeGetCurrentDiagram();
block = bdeGetSelectedBlock(diagram);
bdeSetBlockBackgroundColor(block, 'red');
bdeRedrawDiagram(diagram)
diagram = bdeGetCurrentDiagram();
block = bdeGetSelectedBlock(diagram);
bdeSetBlockBackgroundColor(block, 255, 0, 0, 255);
bdeRedrawDiagram(diagram)