psychic-ui 0.0.0
Loading...
Searching...
No Matches
psychic_ui::Color Class Reference

#include <Color.hpp>

Public Member Functions

 Color (const psychic_color::Color &color)
constexpr std::uint32_t argb () const
constexpr std::uint8_t alpha () const
constexpr Color withAlpha (std::uint8_t alpha) const
constexpr Color over (const Color &below) const
constexpr bool operator== (const Color &) const =default

Static Public Member Functions

static constexpr Color fromARGB (std::uint32_t argb)

Detailed Description

A 32 bits ARGB color. A bare integer doesn't convert: say what it holds with rgb(0xFF0000) (opaque) or argb(0x80FF0000). A psychic-color color (RGB, HSB, ...) converts to its opaque Color.

Constructor & Destructor Documentation

◆ Color()

psychic_ui::Color::Color ( const psychic_color::Color & color)
inline

From a psychic-color color, opaque

Member Function Documentation

◆ over()

Color psychic_ui::Color::over ( const Color & below) const
inlinenodiscardconstexpr

This color painted over another (source over): what shows where a translucent fill lies on below

◆ withAlpha()

Color psychic_ui::Color::withAlpha ( std::uint8_t alpha) const
inlinenodiscardconstexpr

The same color with another alpha, 0 (transparent) to 255 (opaque)


The documentation for this class was generated from the following file: