#lang scribble/manual @(require scribble/manual planet/scribble scribble/eval 2htdp/image "main.rkt" (planet dsheap/color-utils)) @(require (for-label racket 2htdp/image "main.rkt" (planet dsheap/color-utils))) @(defmodule/this-package main) @title{Color Utilities} 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. @defproc[(<-component [band symbol?] [old color?]) (color)]{Produces @racket[band] portion @racket[old]'s @racket[color].} @defproc[(+color [component symbol?] [val number?] [col color?]) (color)]{Produces @racket[color] based on @racket[old], but using intensity @racket[val] in band corresponding to @racket[component].} @defproc[(green+color [val number?] [col color?]) (color)]{Produces @racket[color] based on @racket[col], but with the green intensity to @racket[val]. @racket[red+color], @racket[blue+color], @racket[alpha+color] are analogous.} @defform[(for/image ([id image-expr] ...) body ...+)]{Produce new @racket[image] by binding @racket[id] to each element of @racket[image-expr]'s @racket[color-list] in turn.}