Next Previous Up Top Contents Index

4.3 DUIM-DCs Module

make-contrasting-colors

Function

Summary

Returns a vector of colors with recognizably different appearance.

Signature

make-contrasting-colors n #key k => colors

Arguments

n
An instance of type <integer>.

k
An instance of type <integer>.

Values

colors
An instance of type limited(<sequence>, of: <color>).

Library

duim-dcs

Module

duim-dcs

Description

Returns a vector of n colors with recognizably different appearance. Elements of the vector are guaranteed to be acceptable values for the brush: argument to the drawing functions, and do not include $foreground, $background, or nil. Their class is otherwise unspecified. The vector is a fresh object that may be modified.

If k is supplied, it must be an integer between 0 and n - 1 (inclusive), in which case make-contrasting-colors returns the kth color in the vector rather than the whole vector.

If the implementation does not have n different contrasting colors, make-contrasting-colors signals an error. This does not happen unless n is greater than eight.

The rendering of the color is a true color or a stippled pattern, depending on whether the output medium supports color.

See also

contrasting-colors-limit, page 139

$green, page 153

make-color-for-contrasting-color, page 161

make-contrasting-dash-patterns, page 162


Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index