#lang scribble/manual @(require planet/scribble scribble/eval planet/version "main.rkt") @(define my-eval (make-base-eval)) @(my-eval `(require (planet ,(this-package-version-symbol main)) 2htdp/image)) @(require (for-label racket 2htdp/image "main.rkt")) @title{Color Utilities} @(defmodule/this-package main) 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 of @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]. @examples[#:eval my-eval (green+color 10 (color 1 2 3 4))]} @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.}