Package: cairo

Function cairo:font-options-custom-palette-color

Lambda List

cairo:font-options-custom-palette-color (options index)

Syntax

(cairo:font-options-custom-palette-color options) => red, green, blue, alpha
(setf (cairo:font-options-custom-palette-color options) (list red green blue alpha))

Arguments

options -- a cairo:font-options-t instance
index -- an unsigned integer for the index of the color to get
red -- a number for the red component of the color
green -- a number for the green component of the color
blue -- a number for the blue component of the color
alpha -- a number for the alpha component of the color

Details

The cairo:font-options-custom-palette-color function gets the custom palette color for the color index for the font options instance. Returns nil if no custom color exists for the color index.

The (setf cairo:font-options-custom-palette-color) function sets a custom palette color for the font options instance. This overrides the palette color at the specified color index. This override is independent of the selected palette index and will remain in place even if the cairo:font-options-color-palette function is called to change the palette index.

It is only possible to override color indexes already in the font palette.

Since 1.18

Notes

The arguments are coerced to double floats before being passed to the foreign C functions.
 

See also

2025-1-29