114 static int idx = std::ios::xalloc();
118template <
typename CharT>
134 template <FourBitColour Colour,
typename CharT>
135 static constexpr std::basic_ostream<CharT>&
fourBit(std::basic_ostream<CharT>& stream) {
138 << (Mode ==
_detail::FOREGROUND ?
static_cast<int>(Colour) : (
static_cast<int>(Colour) + 10))
150 template <u
int8_t code,
typename CharT>
151 static constexpr std::basic_ostream<CharT>&
eightBit(std::basic_ostream<CharT>& stream) {
153 stream <<
"\033[" << Mode <<
";5;" << code <<
"m";
168 template <u
int8_t r, u
int8_t g, u
int8_t b,
typename CharT>
169 static constexpr std::basic_ostream<CharT>&
truecolour(std::basic_ostream<CharT>& stream) {
171 stream <<
"\033[" << Mode <<
";2;" << r <<
";" << g <<
";" << b <<
"m";
186template <Typography feature,
typename CharT>
187static constexpr std::basic_ostream<CharT>&
use(std::basic_ostream<CharT>& stream) {
189 stream <<
"\033[" <<
static_cast<int>(feature) <<
"m";
205template <
bool val = true,
typename CharT>
206static constexpr std::basic_ostream<CharT>&
force(std::basic_ostream<CharT>& stream) {
215template <
typename CharT>
216static constexpr std::basic_ostream<CharT>&
reset(std::basic_ostream<CharT>& stream) {
228template <FourBitColour Colour,
typename CharT>
229static constexpr std::basic_ostream<CharT>&
fg(std::basic_ostream<CharT>& stream) {
238template <u
int8_t code,
typename CharT>
239static constexpr std::basic_ostream<CharT>&
fg(std::basic_ostream<CharT>& stream) {
248template <u
int8_t r, u
int8_t g, u
int8_t b,
typename CharT>
249static constexpr std::basic_ostream<CharT>&
fg(std::basic_ostream<CharT>& stream) {
258template <FourBitColour Colour,
typename CharT>
259static constexpr std::basic_ostream<CharT>&
bg(std::basic_ostream<CharT>& stream) {
268template <u
int8_t code,
typename CharT>
269static constexpr std::basic_ostream<CharT>&
bg(std::basic_ostream<CharT>& stream) {
278template <u
int8_t r, u
int8_t g, u
int8_t b,
typename CharT>
279static constexpr std::basic_ostream<CharT>&
bg(std::basic_ostream<CharT>& stream) {
const int MODE_FORCE
Definition Colour.hpp:110
const int BACKGROUND
Definition Colour.hpp:106
const int FOREGROUND
Definition Colour.hpp:105
static bool shouldPrintColour(std::basic_ostream< CharT > &ss)
Definition Colour.hpp:119
const int MODE_AUTO
Definition Colour.hpp:109
int getStreamConfigIdx()
Definition Colour.hpp:113
static constexpr std::basic_ostream< CharT > & bg(std::basic_ostream< CharT > &stream)
Definition Colour.hpp:259
static constexpr std::basic_ostream< CharT > & fg(std::basic_ostream< CharT > &stream)
Definition Colour.hpp:229
static constexpr std::basic_ostream< CharT > & use(std::basic_ostream< CharT > &stream)
Definition Colour.hpp:187
Typography
Definition Colour.hpp:87
FourBitColour
Definition Colour.hpp:57
static constexpr std::basic_ostream< CharT > & reset(std::basic_ostream< CharT > &stream)
Definition Colour.hpp:216
static constexpr std::basic_ostream< CharT > & force(std::basic_ostream< CharT > &stream)
Definition Colour.hpp:206
bool isCppStreamTTY(std::basic_ostream< CharT > &ss)
Definition Environment.hpp:644
Definition Colour.hpp:129
static constexpr std::basic_ostream< CharT > & fourBit(std::basic_ostream< CharT > &stream)
Definition Colour.hpp:135
static constexpr std::basic_ostream< CharT > & eightBit(std::basic_ostream< CharT > &stream)
Definition Colour.hpp:151
static constexpr std::basic_ostream< CharT > & truecolour(std::basic_ostream< CharT > &stream)
Definition Colour.hpp:169