Coreform Cubit 2024.8 User Documentation

Colors

Specifying Colors in Commands

There are multiple ways to refer to a color in a command. They are

  1. <Color_Name>
  2. User "name"
  3. ID <id>
  4. RGB
  5. RGBA
  6. Default
  7. Highlight

The first option uses the name of a pre-defined color as listed in the Available Colors Appendix. This option may not be used for user-defined colors. An example of a pre-defined color assignment is given below:

color volume 1 lightblue

The second option is used with user-defined colors only. Include the name of the user-defined color in quotes. Pre-defined colors will not work with this command.

color volume 1 user "mycolor"

The third option allows you to identify a pre-defined color by its ID. The color IDs are also listed in the Available Colors appendix. This option is rarely used.

color volume 1 id 5

The fourth option allows you to specify a color by R, G and B values ranging between 0.0 and 1.0. This option can be used to specify colors not found on the color table.

color volume 1 rgb 0.7 0.4 0.35

The fifth option allows you to specify a color by R, G, B, and A values ranging between 0.0 and 1.0. This option allows you to specify an Alpha component allowing for transparency. 1.0 is opaque and 0.0 is transparent. This option can be used to specify colors not found on the color table.

color volume 1 rgb 0.7 0.4 0.35 0.4

The default option is used to set an entity's color to its default value. The default color may also be specified in drawing commands, but the command's behavior will be the same as if the color option had not been included at all.

color volume 1 default

The seventh option refers to the current highlight color.

draw curve 1 tangent color highlight

User-Defined Colors

Coreform Cubit has a palette of 92 pre-defined colors, listed in the Appendix under Available Colors. Users may also define their own colors in addition to those defined by Coreform Cubit. Each color is defined by a name and by its RGB components, which range from 0 to 1. Adding user defined colors to the color table is an alternative to using RGB or RGBA color specifications.

To define an additional color, use either of the commands

Color Define "<name>" RGB <r g b>

Color Define "<name>" R <r> G <g> B <b>.

This is done with the command

Color Release "<color_name>"

Color names can be listed with the command

Help Color

They are also listed in the appendix of this manual, along with their RGB definitions. To view a chart of color names and IDs, including those for user-defined colors, use the command

Draw Colortable

Assigning Colors

Colors may be assigned to all geometric entities, and to some other objects as well. To assign a color to an entity or other object, use one of the following commands.

Color Axis Labels {<color_name>| id <color_id> | rgb <r> <g> <b> }

Color Background {<color_name>| id <color_id> | rgb <r> <g> <b>} [<color_name2>|id <color_id2>| rgb <r> <g> <b>]

Color Block <block_id_range>{<color_name> | id <color_id> | rgb <r> <g> <b>}

Color Body <body_id_range> [Geometry|Mesh] {<color_name>| id <color_id> | rgb <r> <g> <b> | Default}

Color Curve <curve_id_range> [Geometry|Mesh] {<color_name>| id <color_id> | rgb <r> <g> <b> | Default}

Color Group <group_id_range> [Geometry|Mesh] {<color_name>| id <color_id> | rgb <r> <g> <b> | Default}

Color Highlight {<color_name>| id <color_id>| rgb <r> <g> <b>}

Color Lines <color_spec>

Color NodeSet <id_range> { <color_name> | id <color_id> | rgb <r> <g> <b> | Default }

Color SideSet <id_range>{ <color_name> | id <color_id> | rgb <r> <g> <b> | Default }

Color Surface <surface_id_range> [Geometry|Mesh] {<color_name>|| rgb <r> <g> <b> Default}

Color Title {<color_name>|id <color_id>| rgb <r> <g> <b> }

Color Volume <volume_id_range> [Geometry|Mesh] {<color_name>| id <color_id> | rgb <r> <g> <b> | Default}

Including the Mesh keyword will change the color of the mesh belonging to the specified entity, without changing the color of the entity geometry itself. Conversely, including the Geometry keyword will change the geometry color without changing the mesh color. Including both keywords is identical to including neither keyword.

Colors are inherited by child entities. If you explicitly set the color for a volume, for example, all of its surfaces will also be drawn in that color. Once you assign a color to an entity, however, it will remain that color and will no longer follow color changes to parent entities. To make an entity follow the color of its parent after having explicitly set another color, use Default as the color name in the color command.

Colors can also be assigned to nodesets, sidesets, and element blocks. These colors do not take effect, however, unless the nodeset, sideset, or element block is drawn with a Draw command.

The background color and the color used to draw highlighted entities can be changed to any color.

By default, the axes are labeled with a white X, Y, and Z, indicating the three primary coordinate directions. If the background is changed to white, these labels are impossible to read; the color used to draw axis labels can be changed to any color. Changing the axis label color will change the text color for both the model axis and the triad (corner axis).

When several entity types are labeled, it can become difficult to determine which labels apply to which entities. To help distinguish which entities are being referred to by the labels, you may want to change the color of labels for specific entity types.

When a meshed surface is drawn in a shaded graphics mode, the mesh edges are not drawn in the same color as the surface. This is to prevent confusion between mesh edges and geometric curves, and to make the mesh edges more visible. The color used to draw mesh edges in this situation is known as the line color, and is gray by default; this color can be changed to any color.

Assigning Global Colors

Colors may be assigned globally also. To assign a global color, use one of the following commands. Global color assignment is useful if one desires all entities to appear the same.

Color Global {<color_name>| id <color_id> | rgb <r> <g> <b> | default}

Color Global Surface {<color_name>| id <color_id> | rgb <r> <g> <b> | default} Curve {<color_name>| id <color_id> | rgb <r> <g> <b> | default} Vertex {<color_name>| id <color_id> | rgb <r> <g> <b> | default}

The first command assigns the desired color to all geometry entities. The color may be enter by color name or color id. The default option resets colors to the default value.

The second command assigns the desired colors to surfaces, curves and vertices. All three value must be entered. For example, users my select global colors for surface and vertex and specify that curves have default colors.