Return a color specification in the model of a supplied color spec.
color
ensure-color color-spec match-color-spec => result
| color-spec⇩ |
A color specification. |
| match-color-spec⇩ |
A color specification. |
| result⇩ |
A color specification. |
The function ensure-color returns a color specification for color-spec, in the color model of match-color-spec. This allows you to convert color specifications from one model to another with having to explicitly state the color model.
If color-spec has an alpha component, then result has that same alpha component.
(ensure-color (make-rgb 1 1 0 0.75) (make-hsv 0 0 0)) => #(:HSV 1 1 1 0.75)
CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:50