Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
No Matches
ColorUtils.h File Reference
#include "utils/Map.h"
#include <cstdint>
#include <string>
#include <utility>
#include <vector>


struct  UTILS::COLOR::ColorInfo
struct  UTILS::COLOR::ColorFloats


namespace  UTILS
namespace  UTILS::COLOR


typedef uint32_t UTILS::COLOR::Color


Color UTILS::COLOR::ChangeOpacity (const Color argb, const float opacity)
 Change the opacity of a given ARGB color.
Color UTILS::COLOR::ConvertToRGBA (const Color argb)
 Convert given ARGB color to RGBA color value.
Color UTILS::COLOR::ConvertToARGB (const Color rgba)
 Convert given RGBA color to ARGB color value.
Color UTILS::COLOR::ConvertToBGR (const Color argb)
 Convert given ARGB color to BGR color value.
Color UTILS::COLOR::ConvertHexToColor (const std::string &hexColor)
 Convert given hex value to Color value.
Color UTILS::COLOR::ConvertIntToRGB (int r, int g, int b)
 Convert given RGB int values to RGB color value.
ColorInfo UTILS::COLOR::MakeColorInfo (const Color &argb)
 Create a ColorInfo from an ARGB Color to get additional information of the color and allow to be sorted with a color comparer.
ColorInfo UTILS::COLOR::MakeColorInfo (const std::string &hexColor)
 Create a ColorInfo from an HEX color value to get additional information of the color and allow to be sorted with a color comparer.
bool UTILS::COLOR::comparePairColorInfo (const std::pair< std::string, ColorInfo > &a, const std::pair< std::string, ColorInfo > &b)
 Comparer for pair string/ColorInfo to sort colors in a hue scale.
ColorFloats UTILS::COLOR::ConvertToFloats (const Color argb)
 Convert given ARGB color to ColorFloats.
std::string UTILS::COLOR::ConvertToHexRGB (const Color argb)
 Convert given ARGB color to hex RGB color value.


constexpr Color UTILS::COLOR::NONE = 0x00000000
constexpr Color UTILS::COLOR::LIMITED_BLACK = 0xFF101010
constexpr Color UTILS::COLOR::WHITE = 0xFFFFFFFF
constexpr Color UTILS::COLOR::SILVER = 0xFFC0C0C0
constexpr Color UTILS::COLOR::GRAY = 0xFF808080
constexpr Color UTILS::COLOR::BLACK = 0xFF000000
constexpr Color UTILS::COLOR::RED = 0xFFFF0000
constexpr Color UTILS::COLOR::MAROON = 0xFF800000
constexpr Color UTILS::COLOR::YELLOW = 0xFFFFFF00
constexpr Color UTILS::COLOR::OLIVE = 0xFF808000
constexpr Color UTILS::COLOR::LIME = 0xFF00FF00
constexpr Color UTILS::COLOR::GREEN = 0xFF008000
constexpr Color UTILS::COLOR::AQUA = 0xFF00FFFF
constexpr Color UTILS::COLOR::TEAL = 0xFF008080
constexpr Color UTILS::COLOR::BLUE = 0xFF0000FF
constexpr Color UTILS::COLOR::NAVY = 0xFF000080
constexpr Color UTILS::COLOR::FUCHSIA = 0xFFFF00FF
constexpr Color UTILS::COLOR::PURPLE = 0xFF800080
constexpr Color UTILS::COLOR::MAGENTA = 0xFFFF00FF
constexpr Color UTILS::COLOR::CYAN = 0xFF00FFFF
 W3C HTML 16 basic color list.