JNGL
Color.hpp
Go to the documentation of this file.
1 // Copyright 2012-2021 Jan Niklas Hasse <[email protected]>
2 // For conditions of distribution and use, see copyright notice in LICENSE.txt
5 #pragma once
6 
7 namespace jngl {
25 class Color {
26 public:
30  Color(unsigned char red, unsigned char green, unsigned char blue);
31 
33  unsigned char getRed() const;
35  void setRed(unsigned char);
36 
38  unsigned char getGreen() const;
40  void setGreen(unsigned char);
41 
43  unsigned char getBlue() const;
45  void setBlue(unsigned char);
46 
47 private:
48  unsigned char red;
49  unsigned char green;
50  unsigned char blue;
51 };
52 
55 
58 [[deprecated("use setBackgroundColor(jngl::Color) instead")]]
59 void setBackgroundColor(unsigned char red, unsigned char green, unsigned char blue);
60 
61 } // namespace jngl
62 
64 jngl::Color operator"" _rgb(unsigned long long);
Object representing a RGB color.
Definition: Color.hpp:25
Color(unsigned char red, unsigned char green, unsigned char blue)
unsigned char getBlue() const
0...255
void setBlue(unsigned char)
0...255
void setGreen(unsigned char)
0...255
void setRed(unsigned char)
0...255
unsigned char getRed() const
0...255
unsigned char getGreen() const
0...255
JNGL's main namespace.
Definition: App.hpp:10
void setBackgroundColor(jngl::Color)
Sets the screen's background color which is visible when nothing is drawn.