Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.0 - English

Change language to:
Français - 日本語 - Português

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab manual >> Graphics Library > Color management > addcolor

addcolor

add new colors to the current colormap

Calling Sequence

new=addcolor(c)

Arguments

new

ids of the colors defined in c in the new color table.

c

matrix with 3 columns, RGB color definition.

Description

addcolor adds new colors given in the c argument to the current colormap. c must be a matrix with 3 columns [R G B]R is red component, G is green component, B is blue component). Each entry in c must be a non negative number less or equal to 1.

The ids of the new colors are returned into new.

If a color defined in c is already present in the current colormap it is not added.

Example

plot3d();
h = gcf();
h.color_map = jetcolormap(16);
addcolor(name2rgb('grey')/255);
<< Color management Color management autumncolormap >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jan 26 16:23:44 CET 2011