C++ Essence Library 0.1.0
A Utility Library for Modern C++ Programming
Loading...
Searching...
No Matches
essence::argb_color Struct Reference

Describes a ARGB color. More...

#include <argb_color.hpp>

Public Member Functions

constexpr operator std::uint32_t () const noexcept
 Converts a 32-bit unsigned integer.
 
template<typename T >
requires std::is_arithmetic_v<T>
constexpr auto normalize (T min, T max) const noexcept
 Normalizes the data to a new range.
 

Public Attributes

std::uint8_t r {}
 
std::uint8_t g {}
 
std::uint8_t b {}
 
std::uint8_t alpha {0xFF}
 

Detailed Description

Describes a ARGB color.

Member Function Documentation

◆ normalize()

template<typename T >
requires std::is_arithmetic_v<T>
auto essence::argb_color::normalize ( T min,
T max ) const
inlineconstexprnoexcept

Normalizes the data to a new range.

Template Parameters
TThe type of the data in the new range.
Parameters
minThe lower bound.
maxThe upper bound.
Returns
The normalized color.

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