bdeSetPortBackgroundColor

Sets the background color of a port.

Syntax

bdeSetPortBackgroundColor(port, color)

bdeSetPortBackgroundColor(port, red, green, blue, alpha)

Inputs

port
The port that will it's background color set.
Type: hwdcConnectionPoint
color
Name of the color to set the port background color to. Can also use color of type hwt::Color.
Type: integer/hwt::Color
red
Value to set the port red background color value to. Values can range from 0-255.
Type: integer
green
Value to set the port green background color value to. Values can range from 0-255.
Type: integer
blue
Value to set the port blue background color value to. Values can range from 0-255.
Type: integer
alpha
Transparency to set the port background color to. Values can range from 0-255.
Type: integer

Examples

Set the background color of a port to red:

          diagram = bdeGetCurrentDiagram();
          block = bdeGetSelectedBlock(diagram);
          portList = bdeGetPortsOnBlock(block);
          portX = portList{[1, 1]};
          bdeSetPortBackgroundColor(portX, 255, 0, 0, 255);
        
Set the background color of a port to red:

          diagram = bdeGetCurrentDiagram();
          block = bdeGetSelectedBlock(diagram);
          portList = bdeGetPortsOnBlock(block);
          portX = portList{[1, 1]};
          bdeSetPortBackgroundColor(portX, 'red');