ColorF

Represents an RGBA color in floating-point (from 0 to 1.0).

Most of the time, you’ll probably want to use Color instead.

This primarily exists to provide a tested out-of-the-box solution when utilizing APIs that work with FP colors.

Constructors and setters come with in-contracts to assert one won’t run into out-of-range color values.

Constructors

this
this(float[4] components)
this(float r, float g, float b, float a)
this
this(Color integer)

Constructs a FP color from an integer one

Members

Functions

components
float[4] components()

Static functions

isValidComponent
bool isValidComponent(float v)

Meta

History

Added December 20, 2023