11#include "../utility/utility.hpp"
12#include "../macros.hpp"
51constexpr auto semantic_color_metadata = enum_metadata{
52 semantic_color::blue,
"blue",
53 semantic_color::green,
"green",
54 semantic_color::indigo,
"indigo",
55 semantic_color::orange,
"orange",
56 semantic_color::pink,
"pink",
57 semantic_color::purple,
"purple",
58 semantic_color::red,
"red",
59 semantic_color::teal,
"teal",
60 semantic_color::yellow,
"yellow",
61 semantic_color::gray,
"gray",
62 semantic_color::gray2,
"gray2",
63 semantic_color::gray3,
"gray3",
64 semantic_color::gray4,
"gray4",
65 semantic_color::gray5,
"gray5",
66 semantic_color::gray6,
"gray6",
67 semantic_color::foreground,
"foreground",
68 semantic_color::border,
"border",
69 semantic_color::fill,
"fill",
70 semantic_color::accent,
"accent",
71 semantic_color::text_select,
"text-select",
72 semantic_color::primary_cursor,
"primary-cursor",
73 semantic_color::secondary_cursor,
"secondary-cursor",
84 return semantic_color_metadata[rhs];
94 return semantic_color_metadata[str];
99template<
typename CharT>
100struct std::formatter<
hi::semantic_color, CharT> : std::formatter<std::string_view, CharT> {
103 return std::formatter<std::string_view, CharT>::format(hi::semantic_color_metadata[t], fc);
semantic_color semantic_color_from_string(std::string_view str)
Convert a string to a semantic color.
Definition semantic_color.hpp:92
semantic_color
Semantic colors.
Definition semantic_color.hpp:23
DOXYGEN BUG.
Definition algorithm.hpp:16
geometry/margins.hpp
Definition lookahead_iterator.hpp:5
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377