RGBColor

Class for representing color in RGB format.

Constructors

this
this(int R, int G, int B)

Constructor for creating colors in RGB format. If called without parameters, then all three values ​​of the channels R, G and B take the value 0, which corresponds to black.

Members

Aliases

luminance
alias luminance = luminance709

Alias for standard (default) luminance calculation. Value is the same as luminance709.

Functions

luminance601
float luminance601()

Luminance according to ITU 601 standard.

luminance709
float luminance709()

Luminance according to ITU 709 standard.

luminanceAverage
float luminanceAverage()

Average luminance.

opBinary
RGBColor opBinary(T rhs)

Basic arithmetic for color operations. The value on the right can be a value of any numeric type.

opBinary
RGBColor opBinary(RGBColor rhs)

Basic arithmetic for color operations. Only the RGBColor type can be used as the value on the right.

toString
string toString()

A string representation of a color. The color is output as a string in the following format: RGBColor(R=<value>, G=<value>, B=<value>, I=<value>), where R,G,B are the values ​​of the three color channels, and I is color brightness according to ITU 709.

Meta