#pragma once #include class Color { public: Color(int r, int g, int b, int a = 255); explicit Color(int g) : Color(g, g, g) {} Color operator+(Color const& rhs) const; friend std::ostream& operator<<(std::ostream& os, Color const&); private: bool out_of_range(int value) const; int r; int g; int b; int a; }; Color operator+(int lhs, Color const& rhs); Color operator+(Color const& lhs, int rhs);