BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
e19ad9c
Branches
Tags
master
Blinker
src
common
Color.h
implement color setting
Stefan Schuermans
commited
e19ad9c
at 2019-06-09 20:32:40
Color.h
Blame
History
Raw
/* Blinker Copyright 2011-2019 Stefan Schuermans <stefan@blinkenarea.org> Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html a blinkenarea.org project */ #ifndef BLINKER_COLOR_H #define BLINKER_COLOR_H #include <string> namespace Blinker { /// a color (24 bit RGB in web notation) class Color { public: /// constructor Color(); public: /** * @brief parse from string * @param[in] str color as string in web format * @return if parsing was successful */ bool fromStr(const std::string &str); /** * @brief convert to string * @return color as string in web format */ std::string toStr() const; public: unsigned char m_red; ///< red channel of color unsigned char m_green; ///< red channel of color unsigned char m_blue; ///< red channel of color }; // class Color } // namespace Blinker #endif // #ifndef BLINKER_COLOR_H