CSC104H1 Lecture Notes - Lecture 6: Data Type
Document Summary
; the function make-color" takes three numbers in (range 0 256 1)" for red, green, and blue. ; intensities (and optionally a fourth number for the opacity), and produces a color value. ; that can be used with the geometric shape functions. ; when not specifying the opacity, it"s used as a ternary function (and the opacity is then. ; automatically set to 255, which means fully opaque). ; make-color : number number number color (require picturing-programs) ; a pastel green circle: (check-expect (circle 50 solid (make-color 150 255 150)) ; a very green circle: (check-expect (circle 50 solid (make-color 0 255 0)) ; a yellow circle: (check-expect (circle 50 solid (make-color 255 255 0)) ; a randomly coloured circle: (circle 50 solid (make-color (random 256) (random 256) (random 256)))