Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - 日本語

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

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

Scilabヘルプ >> Graphics > Color management > color

color

色の色IDを取得

呼び出し手順

id=color(name)
id=color(r,g,b)

パラメータ

name

色の名前.

r,g,b

色のRGB整数値.

id

色のid.

説明

colorは引数に対応する色IDを返します:

  • name には既知の色の名前を指定する必要があります (color_list参照).

  • r, g および b は 赤,緑,青の色素に対応し, 0 から 255の範囲の整数とする必要があります. 通常と同様に, 0 は彩度がないことを意味し, 255 は色の彩度の最大値を意味します.

指定した色がカレントのカラーマップに存在しない場合, カラーマップに追加されます.

この関数はプロットの際に前景色または背景色を指定するために使用されます.

x=linspace(-2*%pi,2*%pi,100)';
// 既存の色を使用
plot2d(x,[sin(x),cos(x)],style=[color("red"),color("green")]);
// 新しい色: カラーマップに追加されます
e=gce(); p1=e.children(1); p2=e.children(2);
p1.foreground=color("purple"); p2.foreground=color("navy blue");
// RGB値を使用
p1.foreground=color(255,128,128);

参照

  • colormap — カラーマップを定義
  • color_list — 色の名前のリスト
  • getcolor — カレントのカラーマップの色を示すダイアログをオープンする
Report an issue
<< bonecolormap Color management color_list >>

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:18:58 CEST 2014