Output range to write the final code into.
Red value.
Green value.
Blue value.
Whether the terminal has a bright background or not.
Whether or not to normalise colours so that they aren't too dark or too bright.
Appender!(char[]) sink; int r, g, b; numFromHex("3C507D", r, g, b); sink.applyTruecolour(r, g, b); sink.put("Foo"); sink.applyANSI(TerminalReset.all); writeln(sink); // "Foo" in #3C507D
Produces a terminal colour token for the colour passed, expressed in terms of red, green and blue, then writes it to the passed output range.