DDNet documentation
Loading...
Searching...
No Matches
log_color.h
Go to the documentation of this file.
1
#ifndef BASE_LOG_COLOR_H
2
#define BASE_LOG_COLOR_H
3
4
#include "
color.h
"
5
#include "
log.h
"
6
7
#include <cstdint>
8
9
template
<>
10
constexpr
LOG_COLOR
color_cast
(
const
ColorRGBA
&rgb)
11
{
12
return
LOG_COLOR
{
13
.r = (uint8_t)(rgb.
r
* 255.0f + 0.5f),
14
.g = (uint8_t)(rgb.
g
* 255.0f + 0.5f),
15
.b = (uint8_t)(rgb.
b
* 255.0f + 0.5f),
16
};
17
}
18
19
#endif
// BASE_LOG_COLOR_H
ColorRGBA
Definition
color.h:183
color4_base::b
float b
Definition
color.h:53
color4_base::r
float r
Definition
color.h:45
color4_base::g
float g
Definition
color.h:49
color.h
log.h
color_cast
constexpr LOG_COLOR color_cast(const ColorRGBA &rgb)
Definition
log_color.h:10
LOG_COLOR
Definition
log.h:17
src
base
log_color.h
Generated by
1.16.1