...loading...
Predefined Colors
SWColor includes 35+ predefined color constants. Call initializeSWColors() in your setup() function after setting colorMode(HSB, 360, 100, 100, 100).
Initialization:
function setup() {
createCanvas(400, 400);
colorMode(HSB, 360, 100, 100, 100);
initializeSWColors(); // Must be called after colorMode
}
Available Colors:
The tables below show all predefined colors organized by color family. Each entry includes the variable name, a visual swatch, and the color values in HSB, RGB, and hexadecimal formats.
Grayscale
Reds & Browns
Oranges & Yellows
Greens
Blues
Purples & Pinks
Usage Example:
function setup() {
createCanvas(400, 400);
colorMode(HSB, 360, 100, 100, 100);
initializeSWColors();
}
function draw() {
background(swOffWhite.col);
fill(swRed.col);
circle(200, 200, 100);
}