Tools=>Colors=>User Color Maps¶
Use this dialog box to create, edit, delete, import and export your own color maps. User color maps can be used like the predefined color maps, e.g. to fill the areas of a contour map (see Data=>3D-Dataset=>Z-Values) or in the dataset style dialog.
- List of user color maps
Displays all user color maps with the name, the number of defined colors and a preview. The preview shows the color map with 12 colors as it is used for a 3D dataset.
- New…
Opens the New Color Map dialog box (see below) to create a new color map. A new color map starts with two colors (blue and red).
- Edit…
Opens the Edit Color Map dialog box for the selected color map. The color map can be renamed. The colors can be added, changed, removed or reordered.
- Delete…
Deletes the selected color maps after a confirmation.
- Import…
Imports the color maps from a color map file (
.rgb), e.g. a file created with Export… by another user. If a user color map with the same name already exists, you will be asked if the color map should be overwritten. Color maps with invalid names or colors are not imported.
- Export…
Saves the selected color maps in a color map file (
.rgb). If no color map is selected all user color maps are exported.
New Color Map / Edit Color Map
- Name
Name of the color map. The name must be unique, must not be longer than 31 characters and must not be the name of a predefined color map (e.g.
viridis). The character}cannot be used.
- Color list
Displays the colors of the color map in the order of use (first color for the smallest value, last color for the largest value). A color map needs at least two colors. The number of colors is not limited. Colors between the defined colors are interpolated.
- Add Color…
Opens the color dialog box to choose a new color. The new color is inserted after the selected color.
- Change Color…
Opens the color dialog box to change the selected color.
- Remove Color
Removes the selected color.
- Up/Down
Moves the selected color one position up or down.
- Preview
Shows the color map with 12 colors.
Comment
The user color maps are saved in the file
Settings\user_color_scales.rgb in the UniPlot user directory (see
GetUserDirectory). The file is not modified when UniPlot is updated or
reinstalled. To use the color maps on a different computer, export the color
maps and import the file on the other computer.
A document only saves the name of the color map used by a 3D dataset. If you delete a user color map that is used in a document, the colors of the dataset are not updated anymore when the isoline values change. If you create a new user color map with the same name, the color map is used again.
The color maps can also be created with a UniScript program, see ColorScale_AddUser.
Example
The following example adds the command “Add Color Map” to the user toolbar.
The command creates the color map MynewColorMap with two colors:
RegisterCommand("Tools", "AddMyColorMap", "Add Color Map");
UserBar_Add("AddMyColorMap");
def AddMyColorMap()
{
ColorScale_AddUser("MynewColorMap", ["#00FF00", "#FF0000"]);
}
History
Version |
Description |
|---|---|
R2026.5 |
New. |
See also
Tools, Tools=>Colors=>User Colors, Data=>3D-Dataset=>Z-Values, ColorScale_AddUser, ColorScale_GetNames, GetColorDialog
id-1079086