resonance 1.0.1
Loading...
Searching...
No Matches
color.h
Go to the documentation of this file.
1#pragma once
2
10struct Color {
11 float r;
12 float g;
13 float b;
14 float a;
15};
16
32void ClampColorToUnitRange(const Color &source, Color &result);
33
56void AddColor(const Color &left, const Color &right, Color &result);
57
70void SubColor(const Color &left, const Color &right, Color &result);
71
87void ScaleColor(const Color &source, float flScale, Color &result);
void ScaleColor(const Color &source, float flScale, Color &result)
Scale all four components of a colour by one factor.
void AddColor(const Color &left, const Color &right, Color &result)
Add two colours component by component.
void SubColor(const Color &left, const Color &right, Color &result)
Subtract one colour from another component by component.
void ClampColorToUnitRange(const Color &source, Color &result)
Clamp all four components of a colour to the unit range.
Linear colour with four float components.
Definition color.h:10
float b
Definition color.h:13
float r
Definition color.h:11
float g
Definition color.h:12
float a
Definition color.h:14