4#include "../core/color.hpp"
5#include "../core/coords.hpp"
6#include "../core/size.hpp"
21 float gray = r * 0.299 + g * 0.587 + b * 0.113;
22 return color(gray, gray, gray);
constexpr color_t color(const float red, const float green, const float blue)
Convert normalized color components into an RGB565 value.
Definition color.hpp:31
void colorComponents(color_t color, float &red, float &green, float &blue)
Split an RGB565 color value into normalized components.
uint16_t color_t
An RGB565 color value. 5 bits red, 6 bits green, 5 bits blue.
Definition color.hpp:13
color_t grayscale(color_t pixel, const Coords &coords, const Size &size)
A pixel shader that converts an image to grayscale.
Definition grayscale.hpp:17
A struct for storing the pixel coordinates of various UI elements.
Definition coords.hpp:17
A struct that holds the number of pixels that a widget would take up on the screen.
Definition size.hpp:17