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
10namespace smk {
11namespace Color {
12
13glm::vec4 RGBA(float red, float green, float blue, float alpha);
14glm::vec4 RGB(float red, float green, float blue);
15
16// Predefined colors.
17extern const glm::vec4 White;
18extern const glm::vec4 Black;
19extern const glm::vec4 Grey;
20extern const glm::vec4 Red;
21extern const glm::vec4 Green;
22extern const glm::vec4 Blue;
23extern const glm::vec4 Yellow;
24extern const glm::vec4 Magenta;
25extern const glm::vec4 Cyan;
26extern const glm::vec4 Transparent;
27
28} // namespace Color
29} // namespace smk
30
31#endif /* end of include guard: SMK_COLOR_HPP */
const glm::vec4 Green
Green.
Definition: Color.cpp:33
const glm::vec4 Black
Black.
Definition: Color.cpp:30
const glm::vec4 Cyan
Cyan.
Definition: Color.cpp:37
const glm::vec4 Transparent
Transparent.
Definition: Color.cpp:38
const glm::vec4 Red
Red.
Definition: Color.cpp:32
const glm::vec4 White
White.
Definition: Color.cpp:29
const glm::vec4 Yellow
Yellow.
Definition: Color.cpp:35
const glm::vec4 Grey
Grey.
Definition: Color.cpp:31
const glm::vec4 Magenta
Magenta.
Definition: Color.cpp:36
const glm::vec4 Blue
Blue.
Definition: Color.cpp:34
glm::vec4 RGB(float red, float green, float blue)
Build an opaque color from its RGB components components.
Definition: Color.cpp:24
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