ColorScale_AddUserΒΆ
ColorScale_AddUser creates or replaces a user color map. The color map is saved in the user directory and is available after a restart and after an update of UniPlot.
- bool = ColorScale_AddUser(ssName, svColor)
Return Value
bool is TRUE (1) if the color map has been saved and FALSE (0) if an error occurred. The error message is written into the event viewer.
Parameters
- ssName
ssName is the name of the color map. The name must not be longer than 31 characters and must not be the name of a predefined color map (see ColorScale_GetNames). If a user color map with the same name exists, it will be replaced.
- svColor
svColor is a string vector with at least two HTML colors in the format
"#RRGGBB", e.g.["#00FF00", "#FF0000"], or a real matrix with three columns (red, green and blue in the range 0 to 255) and one row for each color, e.g.[0,255,0; 255,0,0].
Comment
The user color maps are saved in the file Settings\user_color_scales.rgb
in the UniPlot user directory (see GetUserDirectory). The color maps can
be edited with Tools=>Colors=>User Color Maps.
Example
ColorScale_AddUser("MynewColorMap", ["#00FF00", "#FF0000"]);
rmColor = ColorScale_GetColors("MynewColorMap", 10);
History
Version |
Description |
|---|---|
R2026.5 |
New. |
See also
Tools=>Colors=>User Color Maps, ColorScale_DeleteUser, ColorScale_GetUserNames, ColorScale_GetNames, ColorScale_GetColors
id-1102328