9 Color Helpers

▼ |  | Pict: Functional Pictures

1 | Pict Datatype
2 | Basic Pict Constructors
3 | Pict Combiners
4 | Pict Drawing Adjusters
5 | Bounding Box Adjusters
6 | Pict Finders
7 | More Pict Constructors
8 | Animation Helpers
9 | Color Helpers
10 | Shadows
11 | Conditional Combinations
12 | Tree Layout
13 | Miscellaneous
14 | Rendering
15 | Conversion to Picts

On this page:

red
orange
yellow
green
blue
purple
black
brown
gray
white
cyan
magenta
light
dark
color/ c

9.1
Racket
top contents ← prev up next →

## 9 Color Helpers🔗ℹ

(require pict/color) | package: pict-lib

> procedure (red pict) → pict?
> pict : pict?
> procedure (orange pict) → pict?
> pict : pict?
> procedure (yellow pict) → pict?
> pict : pict?
> procedure (green pict) → pict?
> pict : pict?
> procedure (blue pict) → pict?
> pict : pict?
> procedure (purple pict) → pict?
> pict : pict?
> procedure (black pict) → pict?
> pict : pict?
> procedure (brown pict) → pict?
> pict : pict?
> procedure (gray pict) → pict?
> pict : pict?
> procedure (white pict) → pict?
> pict : pict?
> procedure (cyan pict) → pict?
> pict : pict?
> procedure (magenta pict) → pict?
> pict : pict?

These functions apply appropriate colors to picture p.

Example:

> > (red (disk 20))

Added in version 1.4 of package pict-lib.

> procedure (light color) → color/c
> color : color/c
> procedure (dark color) → color/c
> color : color/c

These functions produce lighter or darker versions of a color.

Example:

> > (hc-append (colorize (disk 20) "red")
> (colorize (disk 20) (dark "red"))
> (colorize (disk 20) (light "red")))

Added in version 1.4 of package pict-lib.

> value color/c : flat-contract?

This contract recognizes color strings, color% instances, and RGB color lists.

Added in version 1.4 of package pict-lib.

top contents ← prev up next →