Flocc

Agent-based modeling in JavaScript in the browser or on the server. [v0.4.8]

Colors

Overview

The flocc.Colors (from here on, just Colors) helper provides a collection of common colors, represented as JavaScript objects with r, g, b, and a values (for red, green, blue, and alpha/opacity, respectively). Each value is a number between 0 and 255. They can be useful for manipulating coordinate values on a Terrain, or as Agent data.

Colors

BLACK { r: 0, g: 0, b: 0, a: 255 }
WHITE { r: 255, g: 255, b: 255, a: 255 }
RED { r: 255, g: 0, b: 0, a: 255 }
MAROON { r: 127, g: 0, b: 0, a: 255 }
YELLOW { r: 255, g: 255, b: 0, a: 255 }
BLUE { r: 0, g: 0, b: 255, a: 255 }
GREEN { r: 0, g: 127, b: 0, a: 255 }
LIME { r: 0, g: 255, b: 0, a: 255 }
AQUA { r: 0, g: 255, b: 255, a: 255 }
ORANGE { r: 255, g: 165, b: 0, a: 255 }
FUCHSIA { r: 255, g: 0, b: 255, a: 255 }
PURPLE { r: 127, g: 0, b: 127, a: 255 }