diff --git a/src/Palette.cpp b/src/Palette.cpp index 7ea50de5..48b33829 100644 --- a/src/Palette.cpp +++ b/src/Palette.cpp @@ -60,7 +60,10 @@ void Palette::initialize (const Rules& rules) // Return the next color in the list. Cycle to the beginning if necessary. Color Palette::next () { - return _colors[_current++ % _colors.size ()]; + if (enabled) + return _colors[_current++ % _colors.size ()]; + + return Color (); } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/Palette.h b/src/Palette.h index cb76943c..ba406ff7 100644 --- a/src/Palette.h +++ b/src/Palette.h @@ -40,6 +40,9 @@ public: Color next (); int size () const; +public: + bool enabled {true}; + private: std::vector _colors {}; int _current {0};