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

Change language to:
Français - 日本語 - Português - Русский

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

Scilab Help >> Graphics > Color management > rgb2name


returns the name of a color

Calling Sequence




RGB integer values of a color.


vector of RGB integer values of a color.


names of the color.


rgb2name returns the color name corresponding to the RGB values given by its argument. A vector of color names can also be returned if the color has more than 1 name. r, g and b must be integers between 0 and 255 corresponding to colors components red, green and blue. As usual 0 means no intensity and 255 means all the intensity of the color. RGB values can also be given by a vector [r,g,b].

If no color is found [] is returned.

The list of all known colors is given by color_list.


rgb2name([255 215 0])
// get color #10 of the current colormap and find its name

See Also

  • color — returns the color id of a color
  • color_list — list of named colors
  • name2rgb — returns the RGB values of a named color
Report an issue
<< rainbowcolormap Color management springcolormap >>

Copyright (c) 2022-2023 (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:
Fri Apr 11 14:06:54 CEST 2014