|
|
constexpr | TextStyle (Emphasis em=Emphasis()) noexcept |
|
constexpr auto | operator|= (TextStyle rhs) -> TextStyle & |
|
constexpr auto | operator== (TextStyle rhs) const noexcept -> bool |
|
constexpr auto | operator!= (TextStyle rhs) const noexcept -> bool |
|
constexpr auto | hasForeground () const noexcept -> bool |
|
constexpr auto | hasBackground () const noexcept -> bool |
|
constexpr auto | hasEmphasis () const noexcept -> bool |
|
constexpr auto | getForeground () const noexcept -> detail::ColorType |
|
constexpr auto | getBackground () const noexcept -> detail::ColorType |
|
constexpr auto | getEmphasis () const noexcept -> Emphasis |
A text style: a foreground colour, a background colour and emphases.
Built with fg, bg and the emphasis enumerators, combined with |:
auto style = fmt::fg(fmt::color::kRed) | fmt::emphasis::kBold;
Combining two styles that both set the same colour slot is an error, since the result would be ambiguous.
- Exceptions
-
| std::invalid_argument | if | would combine two terminal colours, or a terminal colour with an RGB colour, for the same slot. |