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

Classes

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

Namespaces

namespace  KODI
 
namespace  KODI::UTILS
 
namespace  KODI::UTILS::COLOR
 

Typedefs

typedef uint32_t KODI::UTILS::COLOR::Color
 

Functions

Color KODI::UTILS::COLOR::ChangeOpacity (const Color argb, const float opacity)
 Change the opacity of a given ARGB color.
 
Color KODI::UTILS::COLOR::ConvertToRGBA (const Color argb)
 Convert given ARGB color to RGBA color value.
 
Color KODI::UTILS::COLOR::ConvertToARGB (const Color rgba)
 Convert given RGBA color to ARGB color value.
 
Color KODI::UTILS::COLOR::ConvertToBGR (const Color argb)
 Convert given ARGB color to BGR color value.
 
Color KODI::UTILS::COLOR::ConvertHexToColor (const std::string &hexColor)
 Convert given hex value to Color value.
 
Color KODI::UTILS::COLOR::ConvertIntToRGB (int r, int g, int b)
 Convert given RGB int values to RGB color value.
 
ColorInfo KODI::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 KODI::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 KODI::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 KODI::UTILS::COLOR::ConvertToFloats (const Color argb)
 Convert given ARGB color to ColorFloats.
 
std::string KODI::UTILS::COLOR::ConvertToHexRGB (const Color argb)
 Convert given ARGB color to hex RGB color value.
 

Variables

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