+ color
green+ color
for/ image
Version: 5.2.1

Color Utilities

 (require (planet dsheap/color-utils:1:=0))

These are some convenience tools to transform images in the 2htdp/image library. The convenience consists of producing new colors by changing a single intensity by name, and a for-like comprehension for images.

(<-component band old)  (color)
  band : symbol?
  old : color?
Produces band portion old’s color.

(+color component val col)  (color)
  component : symbol?
  val : number?
  col : color?
Produces color based on old, but using intensity val in band corresponding to component.

(green+color val col)  (color)
  val : number?
  col : color?
Produces color based on col, but with the green intensity to val. red+color, blue+color, alpha+color are analogous.

(for/image ([id image-expr] ...)
  body ...+)
Produce new image by binding id to each element of image-expr’s color-list in turn.