| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |
Arguments: &key red green blue alpha scratch-rgb
Returns an rgb color object with the specified values of red, green, blue, and alpha. All arguments should be integers between 0 and 255. The red, green, and blue components default to 0, while the alpha component defaults to 255.
The alpha component is used only on Windows. It
can create translucent effects where the existing background partly
"shows through" new content being drawn. See the variable
*alpha-blending*
for
more information.
If the scratch-rgb argument is specified, it should be a rgb object (such as created by make-rgb) which will be modified to have the new red, green, blue, and alpha values. This avoids consing a new rgb object and is particularly useful when many colors are created, used temporarily, and discarded.
Note that the value of color properties (such as background-color and foreground-color) must be RGB color objects, as made with make-rgb. If you use HLS colors, you should apply the function hls-to-rgb to an HLS color before setting a color property to it. You can use the function rgb-to-hls to get the HLS equivalent of an RGB color.
See also make-hls, hls-to-rgb, rgb-to-hls, and rgb-blue, rgb-red, rgb-green, rgb-equal, rgb-p, and rgb
.
And see cg-color-palettes.htm.
A number of RGB objects are pre-defined as the values of the following symbols:
black
white
gray
dark-gray
light-gray
red
dark-red
light-red
green
dark-green
light-green
blue
dark-blue
light-blue
cyan
dark-cyan
light-cyan
magenta
dark-magenta
light-magenta
yellow
dark-yellow
light-yellow
Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.
| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |