FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

make-rgb

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:


Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version