Note: The representation of an item (other than connections) always occupies a rectangular region on the screen, even if the visible portion of the representation is not rectangular.
![]() |
![]() |
Identifying the G2 Color Palette
G2 supports a large set of colors. G2 displays its color palette when you select color on the menus of items. You can assign any supported color to any color attribute of an item, or to any region of the icon of a system-defined or user-defined class.
metacolor of foreground means that the actual color is determined by the color value of the foreground color attribute of the item's parent workspace.
metacolor of background means that the actual color is determined by the color value of the background color attribute of the item's parent workspace.
metacolor transparent means exactly that: whatever you assign to this metacolor becomes transparent. Any item beneath a transparent item or icon becomes visible.
background-color color attribute of a workspace to transparent.
Each item representation presents a set of color attributes:
icon-color color attribute.
text-color, border-color, and background-color color attributes.
foreground-color and background-color color attributes.
stripe-color color attribute.
icon-color color attribute of an item is distinct from the color regions defined for its icon. For more information about icon color regions, see Composition of an Icon.
The settings of an item's color attributes are part of its knowledge. You can set the color attributes of items interactively or programmatically.
To set a color region of an item interactively:
Select the color choice on the item's menu as described in Changing the Color of an Item.
To change a color attribute of an item:
change the color-attribute-name of item to {color-name | symbolic-expression}
To change a color pattern of an item:
change the color-pattern ofitemso that{color-attribute-nameiscolor-name} [, ...]
icon-color region as well as any other user-defined icon color-region.
To change an icon region of an item:
change theregion-nameicon-colorof itemtocolor-name