All Manuals > CAPI User Guide and Reference Manual > 24 COLOR Reference Entries

make-gray Function

Summary

Returns a color specification in the gray model.

Package

color

Signature

make-gray level &optional alpha => color-spec

Arguments
level
A color component used to define the gray level required.
alpha
A number between 0 and 1, or nil.
Values
color-spec
A color specification.
Description

The function make-gray returns a color-spec in the :gray model with component level.

Note that short-floats are used for the component; this results in the most efficient color conversion process. However, any floating point number type can be used.

alpha indicates the alpha value of the color. 0 means it is transparent, 1 means it is solid. If alpha is nil or not specified then the color does not have an alpha component and it is assumed to be solid.

Examples
CL-USER 25 > (color:make-gray 0.66667s0)
#(:GRAY 0.66667S0)
See also

make-hsv
make-rgb
color-model
color-blue
color-level
color-alpha
15.1 Color specs


CAPI User Guide and Reference Manual (Windows version) - 01 Dec 2021 19:34:21