Previous:Color Vectors Main Index Next:Color Identifiers

#### Color Keywords

The older keyword method of specifying a color is still useful and many users prefer it.

COLOR_KEYWORD_GROUP:
  [ COLOR_KEYWORD_ITEM ]...
COLOR_KEYWORD_ITEM:
  COLOR_IDENTIFIER |

`
  red
` Red_Amount | `blue` Blue_Amount | `green` Green_Amount | `
  filter
` Filter_Amount | `transmit` Transmit_Amount

Although the `color` keyword at the beginning is optional, it is more common to see it in this usage. This is followed by any of five additional keywords `red`, `green`, `blue`, `filter`, or `transmit`. Each of these component keywords is followed by a float expression. For example

     color red 1.0 green 0.5

This specifies a color whose red component is 1.0 or 100% of full intensity and the green component is 0.5 or 50% of full intensity. Although the blue, filter and transmit components are not explicitly specified, they exist and are set to their default values of 0. The component keywords may be given in any order and if any component is unspecified its value defaults to zero. A COLOR_IDENTIFIER can also be specified but it should always be first in the group. See "Common Color Pitfalls" for details.

Previous:Color Vectors Main Index Next:Color Identifiers