Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.2 - Français

Change language to:
English - 日本語 - 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

Aide de Scilab >> Graphiques > Couleurs > name2rgb

name2rgb

returns the RGB values of a named color

Syntax

rgb=name2rgb(name)

Arguments

name

name of the color or matrix with names of the colors.

rgb

vector or matrix with 3 columns of RGB integer values of the colors.

Description

name2rgb returns the RGB values of a color given by its name. The result is a vector or a matrix with 3 columns [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.

Examples

rgb=name2rgb("gold")
rgb2name(rgb)

See also

  • color — returns the color id of a color
  • color_list — liste des noms de couleurs prédéfinies
  • rgb2name — returns the name of a color

History

VersionDescription
6.0.0 Function name2rgb can now handle a single string and a matrix of strings.
Report an issue
<< hsv2rgb Couleurs rgb2name >>

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:
Thu Feb 14 14:59:58 CET 2019