11#include "../utility/utility.hpp"
12#include "../macros.hpp"
17hi_export_module(hikogui.color.semantic_color);
19hi_export
namespace hi {
53constexpr auto semantic_color_metadata = enum_metadata{
54 semantic_color::blue,
"blue",
55 semantic_color::green,
"green",
56 semantic_color::indigo,
"indigo",
57 semantic_color::orange,
"orange",
58 semantic_color::pink,
"pink",
59 semantic_color::purple,
"purple",
60 semantic_color::red,
"red",
61 semantic_color::teal,
"teal",
62 semantic_color::yellow,
"yellow",
63 semantic_color::gray,
"gray",
64 semantic_color::gray2,
"gray2",
65 semantic_color::gray3,
"gray3",
66 semantic_color::gray4,
"gray4",
67 semantic_color::gray5,
"gray5",
68 semantic_color::gray6,
"gray6",
69 semantic_color::foreground,
"foreground",
70 semantic_color::border,
"border",
71 semantic_color::fill,
"fill",
72 semantic_color::accent,
"accent",
73 semantic_color::text_select,
"text-select",
74 semantic_color::primary_cursor,
"primary-cursor",
75 semantic_color::secondary_cursor,
"secondary-cursor",
84[[nodiscard]] hi_inline std::string_view to_string(
semantic_color rhs)
noexcept
86 return semantic_color_metadata[rhs];
96 return semantic_color_metadata[str];
103struct std::formatter<
hi::semantic_color, char> : std::formatter<std::string_view, char> {
106 return std::formatter<std::string_view, char>::format(hi::semantic_color_metadata[t], fc);
hi_inline semantic_color semantic_color_from_string(std::string_view str)
Convert a string to a semantic color.
Definition semantic_color.hpp:94
semantic_color
Semantic colors.
Definition semantic_color.hpp:25
The HikoGUI namespace.
Definition recursive_iterator.hpp:15
The HikoGUI API version 1.
Definition recursive_iterator.hpp:16
constexpr void fill(pixmap_span< uint8_t > image, std::vector< bezier_curve > const &curves) noexcept
Fill a linear gray scale image by filling a curve with anti-aliasing.
Definition bezier_curve.hpp:693