Color.hpp
1
// Copyright 2019 Arthur Sonzogni. All rights reserved.
2
// Use of this source code is governed by the MIT license that can be found in
3
// the LICENSE file.
4
5
#ifndef SMK_COLOR_HPP
6
#define SMK_COLOR_HPP
7
8
#include <glm/glm.hpp>
9
10
namespace
smk {
11
namespace
Color {
12
13
glm::vec4
RGBA
(
float
red,
float
green,
float
blue,
float
alpha);
14
glm::vec4
RGB
(
float
red,
float
green,
float
blue);
15
16
// Predefined colors.
17
extern
const
glm::vec4
White
;
18
extern
const
glm::vec4
Black
;
19
extern
const
glm::vec4
Grey
;
20
extern
const
glm::vec4
Red
;
21
extern
const
glm::vec4
Green
;
22
extern
const
glm::vec4
Blue
;
23
extern
const
glm::vec4
Yellow
;
24
extern
const
glm::vec4
Magenta
;
25
extern
const
glm::vec4
Cyan
;
26
extern
const
glm::vec4
Transparent
;
27
28
}
// namespace Color
29
}
// namespace smk
30
31
#endif
/* end of include guard: SMK_COLOR_HPP */
smk::Color::Green
const glm::vec4 Green
Green.
Definition:
Color.cpp:33
smk::Color::Black
const glm::vec4 Black
Black.
Definition:
Color.cpp:30
smk::Color::Cyan
const glm::vec4 Cyan
Cyan.
Definition:
Color.cpp:37
smk::Color::Transparent
const glm::vec4 Transparent
Transparent.
Definition:
Color.cpp:38
smk::Color::Red
const glm::vec4 Red
Red.
Definition:
Color.cpp:32
smk::Color::White
const glm::vec4 White
White.
Definition:
Color.cpp:29
smk::Color::Yellow
const glm::vec4 Yellow
Yellow.
Definition:
Color.cpp:35
smk::Color::Grey
const glm::vec4 Grey
Grey.
Definition:
Color.cpp:31
smk::Color::Magenta
const glm::vec4 Magenta
Magenta.
Definition:
Color.cpp:36
smk::Color::Blue
const glm::vec4 Blue
Blue.
Definition:
Color.cpp:34
smk::Color::RGB
glm::vec4 RGB(float red, float green, float blue)
Build an opaque color from its RGB components components.
Definition:
Color.cpp:24
smk::Color::RGBA
glm::vec4 RGBA(float red, float green, float blue, float alpha)
Build a color from its RGBA components components. This is equivalent to calling the glm::vec4 constr...
Definition:
Color.cpp:16