8.16.0.4
2 Color
When name is given, it must be one of the predefined names
listed with #{color-database<%>}.
When alpha is not supplied, 1.0 is used.
Color like an existing one can be constructed using with and the field names red, green, blue, and/or alpha.
property | |
| |
property | |
| |
property | |
| |
property | |
Properties to access color components.
Scales a color, making it brighter or darker. If factor is
less than 1, the color is darkened by multiplying the red,
green, and blue components by factor. If factor is
greater than 1, the color is lightened by dividing the gap
between the red, green, and blue components and 255 by
factor.
Blends two colors to produce a new one. Each red, green, and blue
component contributes to the corresponding blended component by its
weighted average, where each color’s alpha is is weight. The result
color’s alpha is the average of the two color’s alphas.
property | |
| |
function | |
The Color.handle property returns a Racket object that
corresponds to the drawing context for use directly with
racket/draw. The Color.from_handle function
creates a Color from such a Racket object.