-
Notifications
You must be signed in to change notification settings - Fork 7
BasicColor
Refaltor77 edited this page Mar 29, 2026
·
1 revision
Color utility class with predefined colors and generators.
use refaltor\ui\colors\BasicColor;All colors are returned as RGB float arrays [R, G, B] with values from 0.0 to 1.0.
BasicColor::white(); // [1.0, 1.0, 1.0]
BasicColor::black(); // [0.0, 0.0, 0.0]
BasicColor::red(); // [1.0, 0.0, 0.0]
BasicColor::green(); // [0.0, 1.0, 0.0]
BasicColor::blue(); // [0.0, 0.0, 1.0]
BasicColor::yellow(); // [1.0, 1.0, 0.0]
BasicColor::cyan(); // [0.0, 1.0, 1.0]
BasicColor::magenta(); // [1.0, 0.0, 1.0]BasicColor::rgb(0.5, 0.3, 0.9); // Custom colorBasicColor::randomColor(); // Random RGB
BasicColor::randomPastelColor(); // Random soft color
BasicColor::randomShadeOfGray(); // Random grayscale$comp = BasicColor::complementaryColor(BasicColor::red());
// Returns [0.0, 1.0, 1.0] (cyan)BasicColor::DEFAULT; // [1.0, 1.0, 1.0] (white)- Label — Text colors
- Image — Image tinting
- CustomRender — Renderer colors