Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
color.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
18
19namespace sham::term {
20
24 namespace style {
26 const char *reset();
28 const char *bold();
30 const char *faint();
32 const char *underline();
34 const char *blink();
35 } // namespace style
36
40 namespace colors_8b {
42 const char *black();
44 const char *red();
46 const char *green();
48 const char *yellow();
50 const char *blue();
52 const char *magenta();
54 const char *cyan();
56 const char *white();
57 } // namespace colors_8b
58
62 void enable_colors();
63
67 void disable_colors();
68
72 bool are_colors_enabled();
73
74} // namespace sham::term
void enable_colors()
Enable terminal color output.
Definition color.cpp:62
void disable_colors()
Disable all terminal color output.
Definition color.cpp:65
bool are_colors_enabled()
Query whether terminal color output is currently enabled.
Definition color.cpp:68
8 bit 8-color palette escape sequences.
Definition color.hpp:40
const char * red()
Escape sequence to set red text color.
Definition color.cpp:52
const char * green()
Escape sequence to set green text color.
Definition color.cpp:53
const char * black()
Escape sequence to set black text color.
Definition color.cpp:51
const char * white()
Escape sequence to set white text color.
Definition color.cpp:58
const char * magenta()
Escape sequence to set magenta (pink) text color.
Definition color.cpp:56
const char * cyan()
Escape sequence to set cyan text color.
Definition color.cpp:57
const char * blue()
Escape sequence to set blue text color.
Definition color.cpp:55
const char * yellow()
Escape sequence to set yellow text color.
Definition color.cpp:54
Terminal text styling escape sequences (bold, faint, underline, blink, reset).
Definition color.hpp:24
const char * blink()
escape sequence to set blinking text formatting.
Definition color.cpp:47
const char * reset()
escape sequence to reset the terminal text formatting.
Definition color.cpp:43
const char * bold()
escape sequence to set bold text formatting.
Definition color.cpp:44
const char * underline()
escape sequence to set underlined text formatting.
Definition color.cpp:46
const char * faint()
escape sequence to set faint (dim) text formatting.
Definition color.cpp:45