namespace new in Git master
#include <Magnum/Math/Color.h>
ColorLiterals Math color literals.
See the Literals namespace and the Color3 and Color4 classes for more information.
Functions
- auto operator""_rgb(unsigned long long value) -> Color3<UnsignedByte> constexpr
- 8bit-per-channel linear RGB literal
- auto operator""_srgb(unsigned long long value) -> Vector3<UnsignedByte> constexpr
- 8bit-per-channel sRGB literal
- auto operator""_rgba(unsigned long long value) -> Color4<UnsignedByte> constexpr
- 8bit-per-channel linear RGBA literal
- auto operator""_srgba(unsigned long long value) -> Vector4<UnsignedByte> constexpr
- 8bit-per-channel sRGB + alpha literal
- auto operator""_rgbf(unsigned long long value) -> Color3<Float> constexpr
- Float linear RGB literal.
- auto operator""_srgbf(unsigned long long value) -> Color3<Float>
- Float sRGB literal.
- auto operator""_rgbaf(unsigned long long value) -> Color4<Float> constexpr
- Float linear RGBA literal.
- auto operator""_srgbaf(unsigned long long value) -> Color4<Float>
- Float sRGB + alpha literal.
Function documentation
Color3<UnsignedByte> Magnum:: Math:: Literals:: ColorLiterals:: operator""_rgb(unsigned long long value) constexpr
8bit-per-channel linear RGB literal
Unpacks the literal into three 8-bit values. Example usage:
using namespace Math::Literals; Color3ub a = 0x33b27f_rgb; // {0x33, 0xb2, 0x7f}
Vector3<UnsignedByte> Magnum:: Math:: Literals:: ColorLiterals:: operator""_srgb(unsigned long long value) constexpr
8bit-per-channel sRGB literal
Unpacks the literal into three 8-bit values without any colorspace conversion. Behaves identically to operator""_
using namespace Math::Literals; Vector3ub a = 0x33b27f_srgb; // {0x33, 0xb2, 0x7f}
Color4<UnsignedByte> Magnum:: Math:: Literals:: ColorLiterals:: operator""_rgba(unsigned long long value) constexpr
8bit-per-channel linear RGBA literal
Unpacks the literal into four 8-bit values. Example usage:
using namespace Math::Literals; Color4ub a = 0x33b27fcc_rgba; // {0x33, 0xb2, 0x7f, 0xcc}
Vector4<UnsignedByte> Magnum:: Math:: Literals:: ColorLiterals:: operator""_srgba(unsigned long long value) constexpr
8bit-per-channel sRGB + alpha literal
Unpacks the literal into four 8-bit values without any colorspace conversion. Behaves identically to operator""_
using namespace Math::Literals; Vector4ub a = 0x33b27fcc_srgba; // {0x33, 0xb2, 0x7f, 0xcc}
Color3<Float> Magnum:: Math:: Literals:: ColorLiterals:: operator""_rgbf(unsigned long long value) constexpr
Float linear RGB literal.
Equivalent to calling Color3::
using namespace Math::Literals; Color3 a = 0x33b27f_rgbf; // {0.2f, 0.698039f, 0.498039f}
Color3<Float> Magnum:: Math:: Literals:: ColorLiterals:: operator""_srgbf(unsigned long long value)
Float sRGB literal.
Calls Color3::
using namespace Math::Literals; Color3 a = 0x33b27f_srgbf; // {0.0331048f, 0.445201f, 0.212231f}
Color4<Float> Magnum:: Math:: Literals:: ColorLiterals:: operator""_rgbaf(unsigned long long value) constexpr
Float linear RGBA literal.
Equivalent to calling Color4::
using namespace Math::Literals; Color4 a = 0x33b27fcc_rgbaf; // {0.2f, 0.698039f, 0.498039f, 0.8f}
Color4<Float> Magnum:: Math:: Literals:: ColorLiterals:: operator""_srgbaf(unsigned long long value)
Float sRGB + alpha literal.
Calls Color4::
using namespace Math::Literals; Color4 a = 0x33b27fcc_srgbaf; // {0.0331048f, 0.445201f, 0.212231f, 0.8f}