diff --git a/modules/Grid/Grid.cpp b/modules/Grid/Grid.cpp index dad75d1..74956cb 100644 --- a/modules/Grid/Grid.cpp +++ b/modules/Grid/Grid.cpp @@ -3,6 +3,7 @@ #include #include #include +#include // rectangles have width between 2 and 50 pixels // rectangles have color black, white, or sand @@ -12,10 +13,10 @@ // screensize therefore determines grid, which should be centered // after some time, a new random setup is chosen, and we animate to the new situation -const RGB black {0, 0, 0}; -const RGB white {1, 1, 1}; -const RGB sand {182.0 / 256.0, 144.0 / 256.0, 97.0 / 256.0}; -const RGB pastel_green {177.0 / 256.0, 209.0 / 256.0, 175.0 / 256.0}; +const std::string black {"#000000"}; +const std::string white {"#FFFFFF"}; +const std::string sand {"#B69061"}; +const std::string pastel_green {"#B1D1AF"}; struct Rect { double cx {0}; @@ -103,6 +104,10 @@ void Grid::configure() { _fade = _j["fade"]; _border = _j["border"]; _new.bg = Color {_j["bg"]}; + _colors.clear(); + for (const auto& hex : _j["colors"]) { + _colors.emplace_back(hex); + } } int Grid::fps() const {