7#include "../enum_metadata.hpp"
10namespace hi::inline
v1 {
12enum class semantic_color :
unsigned char {
40constexpr auto semantic_color_metadata = enum_metadata{
41 semantic_color::blue,
"blue",
42 semantic_color::green,
"green",
43 semantic_color::indigo,
"indigo",
44 semantic_color::orange,
"orange",
45 semantic_color::pink,
"pink",
46 semantic_color::purple,
"purple",
47 semantic_color::red,
"red",
48 semantic_color::teal,
"teal",
49 semantic_color::yellow,
"yellow",
50 semantic_color::gray,
"gray",
51 semantic_color::gray2,
"gray2",
52 semantic_color::gray3,
"gray3",
53 semantic_color::gray4,
"gray4",
54 semantic_color::gray5,
"gray5",
55 semantic_color::gray6,
"gray6",
56 semantic_color::foreground,
"foreground",
57 semantic_color::border,
"border",
58 semantic_color::fill,
"fill",
59 semantic_color::accent,
"accent",
60 semantic_color::text_select,
"text-select",
61 semantic_color::primary_cursor,
"primary-cursor",
62 semantic_color::secondary_cursor,
"secondary-cursor",
67[[nodiscard]]
inline std::string_view
to_string(semantic_color rhs)
noexcept
69 return semantic_color_metadata[rhs];
73[[nodiscard]]
inline semantic_color semantic_color_from_string(std::string_view str)
75 return semantic_color_metadata[str];
80template<
typename CharT>
81struct std::formatter<
hi::semantic_color, CharT> : std::formatter<std::string_view, CharT> {
82 auto format(hi::semantic_color
const &t,
auto &fc)
84 return std::formatter<std::string_view, CharT>::format(hi::semantic_color_metadata[t], fc);
constexpr std::string to_string(std::u32string_view rhs) noexcept
Conversion from UTF-32 to UTF-8.
Definition to_string.hpp:215
DOXYGEN BUG.
Definition algorithm.hpp:15
geometry/margins.hpp
Definition assert.hpp:18