Adds a specified alpha component to a color.
color
color-with-alpha color alpha => color-spec
color⇩ |
A color specification. |
alpha⇩ |
A real in the inclusive range [0,1]. |
color-spec⇩ |
A color specification, or nil . |
The function color-with-alpha
returns a color like the argument color but with alpha component alpha.
color needs to be a color specification, either a keyword naming a color (a member of the result of calling get-all-color-names), or a color-spec (for example the result of make-rgb).
alpha must be a real in the inclusive range [0,1], otherwise an error is signaled. alpha = 0 means color-spec is transparent, alpha = 1 means it is solid.
color-with-alpha
returns a color-spec, or nil
if color is not recognized.
CAPI User Guide and Reference Manual (Unix version) - 01 Dec 2021 19:33:10