1 #ifndef CPPURSES_DEMOS_PALETTE_PALETTE_HELPERS_HPP
2 #define CPPURSES_DEMOS_PALETTE_PALETTE_HELPERS_HPP
3 #include <cstdint>
4 
5 #include <cppurses/painter/color.hpp>
6 #include <cppurses/painter/color_definition.hpp>
7 #include <cppurses/painter/palette.hpp>
8 
9 namespace palette {
10 namespace detail {
11 
12 /// Return the current Color_definition of \p color in \p palette.
13 cppurses::Color_definition& extract_definition(cppurses::Palette& palette,
14                                                cppurses::Color color);
15 
16 /// Set the red value of \p color and update the display.
17 void set_red(cppurses::Color color, cppurses::Underlying_color_t red_value);
18 
19 /// Set the green value of \p color and update the display.
20 void set_green(cppurses::Color color, cppurses::Underlying_color_t green_value);
21 
22 /// Set the blue value of \p color and update the display.
23 void set_blue(cppurses::Color color, cppurses::Underlying_color_t blue_value);
24 
25 }  // namespace detail
26 }  // namespace palette
27 #endif  // CPPURSES_DEMOS_PALETTE_PALETTE_HELPERS_HPP
28