normaliseColoursBright

Takes a colour and, if it deems it is too bright to see on a light terminal background, makes it darker.

version(Colours)
private pure @safe nothrow @nogc
void
normaliseColoursBright
(
ref uint r
,
ref uint g
,
ref uint b
)

Parameters

r uint

Reference to a red value.

g uint

Reference to a green value.

b uint

Reference to a blue value.

Examples

int r = 255;
int g = 128;
int b = 100;
normaliseColoursBright(r, g, b);
assert(r != 255);
assert(g != 128);
assert(b != 100);