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.
Type: block
color
Color to set the block's background color to.
Type: string
red
Value to set the block's red color value to. Values range from 0-255.
Type: integer
green
Value to set the block's green color value to. Values range from 0-255.
Type: integer
blue
Value to set the block's blue color value to. Values range from 0-255.
Type: integer
alpha
Transparency to set the block's background color to. Values range from 0-255.
Type: integer

Examples

Set a block's background color to red:

          diagram = bdeGetCurrentDiagram();
          block = bdeGetSelectedBlock(diagram);
          bdeSetBlockBackgroundColor(block, 'red');
          bdeRedrawDiagram(diagram)
        
Set a block's background color to red:

          diagram = bdeGetCurrentDiagram();
          block = bdeGetSelectedBlock(diagram);
          bdeSetBlockBackgroundColor(block, 255, 0, 0, 255);
          bdeRedrawDiagram(diagram)