実例 Color

Color

This expands on the Shape Primitives example by adding color. background() fills the canvas with one color, stroke() sets the color for drawing lines, and fill() sets the color for the inside of shapes. noStroke() and noFill() turn off line color and inner color, respectively.

Colors can be represented in many different ways. This example demonstrates several options.