std.graphics.Color - nitrologic/monkey2 GitHub Wiki

std::std.graphics.Color

Struct Color

The Color type provides support for manipulating red, green blue, alpha colors.

Consts
Aluminum Aluminum.
Aqua Aqua.
Black Black.
Blue Blue.
Brown Brown.
Chromium Chromium.
Cobalt Cobalt.
Copper Copper.
Cyan Cyan.
DarkGrey Dark Grey.
Gold Gold.
Green Green.
Grey Grey.
HotPink HotPink.
LightGrey Light Grey.
Lime Lime.
Magenta Magenta.
Nickel Nickel.
None Transparent black.
Orange Orange.
Pine Pine.
Pink Pink.
Platinum Platinum.
Puce Puce.
Red Red.
SeaGreen SeaGreen.
Silver Silver.
Skin Skin.
Sky Sky.
Steel Steel.
Titanium Titanium.
Violet Violet.
White White.
Yellow Yellow.
Fields
a Alpha component of color.
b Blue component of color.
g Green component of color.
r Red component of color.
Constructors
New Creates a new color.
Properties
A The alpha color component.
B The blue color component.
G The green color component.
R The Red color component.
Methods
OpMul Multiplies the color by another color or value and returns the result.
OpAdd Adds another color or value to the color and returns the result.
OpSub Subtracts another color or value from the color and returns the result.
OpDiv Divides the color by another color or value and returns the result.
Blend Blends the color with another color and returns the result.
ToARGB Converts the color to 32 bit ARGB format.
ToString Converts the color to printable string.
To Converts the color to a printable string.
Functions
FromARGB Creates a color from a 32 bit ARGB color.
FromHSV Creates a color from hue, saturation and value.
Rnd Creates a random color.