Manage the Color Mapping of Plies
Color mapping is a way to manage colors of laminate objects, such as plies and cores. You can assign a color to the laminate objects that have the same material-orientation combinations. Colors help differentiate between different ply types when they are displayed in the graphics window.
Manage the color mapping of laminate objects in one of the following ways:
Set Colors Using the Color Mapping Dialog Box
In the Color Mapping dialog box, you can view color settings defined by the system and by the color mapping file. The color settings are specified with one of the following attributes:
Read-only—Indicates that the material-orientation combination and its color are defined in the color mapping file. This setting cannot be modified in the dialog box. To change the settings, edit the color mapping file.
Accessible—Indicates that the material-orientation combination and its color are defined by the system. You can change the color in the dialog box.
Conflict—Indicates that the same color is defined for different material-orientation combinations. A conflict occurs when the same color is defined for different ply types in the Color Mapping dialog box, the color mapping file, or both. To investigate, select Conflict in the Attributes column or the ply type in the same row. To resolve the conflict, edit the editable colors in the Color Mapping dialog box and the read-only colors in the color mapping file.
Manage the color mapping using the Color Mapping dialog box as follows:
1. Click Setup > Color Mapping. The Color Mapping dialog box opens.
* 
The Setup > Color Mapping command is available when at least one laminate object is created. To learn how to create a ply, see Create a Ply. To learn how to create a core, see Create a Core.
2. To change the color of a material-orientation combination, click in the adjacent cell in the Color column and select a different color. You can click Use Default to revert the color to default.
3. Click OK.
Predefine Colors Using the Color Mapping File
You can use the color mapping file to set the color settings for plies and cores even before you create the plies and cores. For this, you predefine material-orientation combinations and RGB values for their colors in a JSON file, and then use this file as a color mapping file.
When the color mapping file is loaded in the session, the color settings from the mapping file are applied to the plies and cores of all composite features in the part. The settings defined in the mapping file are also displayed in the Color Mapping dialog box with Read-only attribute. To change the settings, modify the color mapping file.
By default, the color settings from the pro_composite_colors.json file are applied when the file is found in the working directory.
The format for defining a color for a material-orientation combination is as follows:
{
"RGB color": "Enter an RGB value for the color, such as 230 81 0.",
"material": "Enter the name of the material, such as LTE800_36.",
"orientation": Enter the orientation, such as 90.0.
},
For example:
{
"RGB color": "230 81 0",
"material": "LTE800_36",
"orientation": 90.0
},
To get a color mapping file, do one of the following:
Click here to access the downloads page. Click English to download the composite_color_mapping.zip folder to your computer and then extract it. The extracted folder contains an instruction file and a demo file. The demo file contains the supplied settings to try out. You can edit the color settings and create new code sections in the demo file or in the instruction file, and use them for your model.
Create a new color mapping file as follows:
1. Open Notepad or Notepad++.
2. Define each material-orientation combination and its RGB color. Enter the RGB values from 0 to 255 separated by a space, such as 230 81 0. Enter the orientation as an angular value with at least one decimal place, such as 90.0. An example of a code block is as follows:
{
"RGB color": "230 81 0",
"material": "LTE800_36",
"orientation": 90.0
},
* 
Make sure not to enter a comma after the closing brace } of the last code block.
3. Enclose all entries in square brackets [ ].
An example of a complete file is as follows:
[
{
"RGB color": "230 81 0",
"material": "LTE800_36",
"orientation": 90.0
},
{
"RGB color": "124 179 66",
"material": "UC300_56",
"orientation": 0.0
},
{
"RGB color": "155 89 182",
"material": "AIREX-C70_90",
"orientation": 90.0
}
]
4. Save this file with a *.json extension, for example, pro_composite_colors.json.
Set the full path to the file in one of the following ways:
Click File > Options. The Creo+ Options dialog box opens. Click Applications > Composite. Specify the full path to the JSON file under Color Mapping.
* 
When you set the path to the color mapping file from the Composite environment, make sure to exit the feature, and then redefine it again to apply the changes.
Was this helpful?