Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - 日本語 - Русский

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

Scilab help >> Graphics > Color management > name2rgb


returns the RGB values of a named color

Calling Sequence




name of the color.


vector of RGB integer values of a color.


name2rgb returns the RGB values of a color given by its name. The result is a vector [r,g,b] where r, g and b are 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.

If no color is found [] is returned.

The list of all known colors is given by color_list.



See Also

  • color — returns the color id of a color
  • color_list — list of named colors
  • rgb2name — returns the name of a color
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Apr 02 17:36:23 CEST 2013