11#include "../utility/module.hpp"
48constexpr auto semantic_color_metadata = enum_metadata{
49 semantic_color::blue,
"blue",
50 semantic_color::green,
"green",
51 semantic_color::indigo,
"indigo",
52 semantic_color::orange,
"orange",
53 semantic_color::pink,
"pink",
54 semantic_color::purple,
"purple",
55 semantic_color::red,
"red",
56 semantic_color::teal,
"teal",
57 semantic_color::yellow,
"yellow",
58 semantic_color::gray,
"gray",
59 semantic_color::gray2,
"gray2",
60 semantic_color::gray3,
"gray3",
61 semantic_color::gray4,
"gray4",
62 semantic_color::gray5,
"gray5",
63 semantic_color::gray6,
"gray6",
64 semantic_color::foreground,
"foreground",
65 semantic_color::border,
"border",
66 semantic_color::fill,
"fill",
67 semantic_color::accent,
"accent",
68 semantic_color::text_select,
"text-select",
69 semantic_color::primary_cursor,
"primary-cursor",
70 semantic_color::secondary_cursor,
"secondary-cursor",
81 return semantic_color_metadata[rhs];
91 return semantic_color_metadata[str];
96template<
typename CharT>
97struct std::formatter<
hi::semantic_color, CharT> : std::formatter<std::string_view, CharT> {
100 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
semantic_color semantic_color_from_string(std::string_view str)
Convert a string to a semantic color.
Definition semantic_color.hpp:89
semantic_color
Semantic colors.
Definition semantic_color.hpp:20
DOXYGEN BUG.
Definition algorithm.hpp:13
geometry/margins.hpp
Definition cache.hpp:11