Euphoria
Main Page
Related Pages
Topics
Namespaces
Concepts
Classes
Files
File List
File Members
libs
core
src
eu
core
color.h
Go to the documentation of this file.
1
#pragma once
2
3
namespace
eu::core
4
{
5
6
9
enum class
SingleColor
: std::uint32_t {};
10
17
constexpr
SingleColor
color_from_rgba
(
uint8_t
r,
uint8_t
g,
uint8_t
b,
uint8_t
a) {
18
return
static_cast<
SingleColor
>
((
static_cast<
uint32_t
>
(a) << 24) |
19
(
static_cast<
uint32_t
>
(b) << 16) |
20
(
static_cast<
uint32_t
>
(g) << 8) |
21
(
static_cast<
uint32_t
>
(r)));
22
}
23
24
25
}
eu::core
Definition
color.h:4
eu::core::color_from_rgba
constexpr SingleColor color_from_rgba(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
Constructs a SingleColor value from individual red, green, blue, and alpha components.
Definition
color.h:17
eu::core::SingleColor
SingleColor
A single color in a format to load directly into open gl texture(ABGR on little endian).
Definition
color.h:9
eu::R
A (inclusive) range between two values.
Definition
range.h:19
Generated by
1.9.8