Previous Page Next Page Contents

RGB -- predefined color names

Introduction

RGB::Name evaluates to a list [r, g, b] representing the color 'Name' by its red, green and blue contributions according to the RGB color model.

RGB::ColorNames() provides a list of all predefined color names.

RGB::ColorNames(subname) provides a list of all predefined color names that contain subname.

Call(s)


RGB::Name RGB::ColorNames()
RGB::ColorNames(subname)

Parameters

Name - the name of a color: an identifier
subname - a part of a color name: an identifier

Returns

RGB::Name evaluates to a list [r, g, b] of real floating point numbers between 0.0 and 1.0. RGB::ColorNames returns a list of predefined color names.

Related Functions

plot2d, plotfunc2d, plot3d, plotfunc3d

Details

Example 1

The basic colors of the RGB model are red, green and blue:

>> RGB::Red, RGB::Green, RGB::Blue
             [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]

The following call returns all predefined color names containing 'Olive':

>> RGB::ColorNames(Olive)
                    [OliveDrab, Olive, OliveGreenDark]

The RGB values of these colors are:

>> RGB::OliveDrab, RGB::Olive, RGB::OliveGreenDark
      [0.419599, 0.556902, 0.137303],
      
         [0.230003, 0.370006, 0.170003],
      
         [0.333293, 0.419599, 0.184301]

Example 2

The following command plots a filled grey triangle with black border lines on a white background:

>> plot2d(BackGround = RGB::White,
          ForeGround = RGB::Black,
          Labeling = TRUE,
          [Mode = List, [polygon(point(0, 0), 
                                 point(1, 0),
                                 point(0, 1),
                                 Closed = TRUE,
                                 Filled = TRUE,
                                 Color = RGB::LightGrey)]
          ])

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000