NeuralEngine A Game Engine with embeded Machine Learning algorithms based on Gaussian Processes. |

FgColor.h
1
11#pragma once
12
13#include <NeMachineLearningLib.h>
14#include <string>
15
16 namespace NeuralEngine
17{
18 namespace MachineLearning
19 {
20 class NE_IMPEXP Color
21 {
22 public:
23 Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255);
24 Color(const uint8_t* rgb, uint8_t a = 255);
25 Color();
26
27 Color alpha(uint8_t alpha) const;
28 Color gamma(float gamma) const;
29 float hue() const;
30
31 static Color gray(uint8_t v);
32 static Color hue(float hue);
33 static Color cos(float hue);
34 static Color index(uint8_t index, uint8_t density = 16, float avoid = 2.f, float range = 2.f);
35 static Color hash(const std::string& seed);
36 static Color uniq(const std::string& name);
37
38 uint8_t r, g, b, a;
39 };
40
41 static const Color Red = Color::hue(0.f);
42 static const Color Orange = Color::hue(.5f);
43 static const Color Yellow = Color::hue(1.f);
44 static const Color Lawn = Color::hue(1.5f);
45 static const Color Green = Color::hue(2.f);
46 static const Color Aqua = Color::hue(2.5f);
47 static const Color Cyan = Color::hue(3.f);
48 static const Color Sky = Color::hue(3.5f);
49 static const Color Blue = Color::hue(4.f);
50 static const Color Purple = Color::hue(4.5f);
51 static const Color Magenta = Color::hue(5.f);
52 static const Color Pink = Color::hue(5.5f);
53 static const Color Black = Color::gray(0);
54 static const Color Dark = Color::gray(32);
55 static const Color Gray = Color::gray(128);
56 static const Color Light = Color::gray(223);
57 static const Color White = Color::gray(255);
58
59 std::vector<MachineLearning::Color> Colors = { Orange, Yellow, Blue, Lawn, Aqua, Cyan, Sky, Purple, Magenta, Pink, Black, Dark, Gray, Light, White };
60 }
61}
NeuralEngine::MachineLearning::Color
Definition: FgColor.h:21
NeuralEngine
Definition: NeArray2.h:18