On this page:
make-color/  ryb
ryb-series
8.12

2 RYB Color Model🔗ℹ

procedure

(make-color/ryb red yellow blue)  color%

  red : (real-in 0 1)
  yellow : (real-in 0 1)
  blue : (real-in 0 1)
Produces a color% object given a coordinate in the red-yellow-blue (RYB) color space. The RYB color model is a subtractive model used for painting and art education. This function produces an approximation in the RGB color model.

Examples:
> (colorize (disk 50) (make-color/ryb 0 1 1))

image

> (colorize (filled-rectangle 40 40) (make-color/ryb 1 0.5 1))

image

procedure

(ryb-series red-1    
  yellow-1    
  blue-1    
  red-2    
  yellow-2    
  blue-3    
  #:midpoints midpoints)  (listof color%)
  red-1 : (real-in 0 1)
  yellow-1 : (real-in 0 1)
  blue-1 : (real-in 0 1)
  red-2 : (real-in 0 1)
  yellow-2 : (real-in 0 1)
  blue-3 : (real-in 0 1)
  midpoints : 1
Produces a list of color% objects that represent averages (or mixtures) of the two input colors in the RYB model.

The midpoints argument controls how many recursive averagings to perform. A midpoints of 1 produces three colors, 2 produces five, and so on.

Examples:
> (map (λ (c) (colorize (filled-rounded-rectangle 50 50) c))
       (ryb-series 0.2 0.1 0.3 0 0 0.8
                   #:midpoints 2))

'(image image image image image)

> (map (λ (c) (colorize (filled-rounded-rectangle 50 50) c))
       (ryb-series 0 1 0 0 0 0.8
                   #:midpoints 3))

'(image image image image image image image image image)

> (plot (contour-intervals (λ (x y) (+ x y)) -2 2 -2 2
                           #:levels 4 #:contour-styles '(transparent)
                           #:colors (ryb-series 0 0.3 0.3 0.5 0.3 0.2
                                                #:midpoints 2)))

image