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

ensure-model-color Function

Summary

Converts a color specification to a given model.

Package

color

Signature

ensure-model-color color-spec model => result

Arguments
color-spec
A color specification.
model
A color-model (:rgb, :hsv or :gray).
Values
result
A color specification.
Description

The function ensure-model-color returns a color specification for color-spec in the color model specified by model.

If color-spec has an alpha component, then result has that same alpha component.

Examples
(ensure-model-color (make-rgb 1 1 0 0.75) :hsv)
=>
#(:HSV 1 1 1 0.75)
See also

convert-color
colors=
ensure-color
ensure-rgb
15 The Color System


CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:50