Several simple methods to handle collections of similar colours. More...
Enumerations | |
enum | EType { kInvalid, kUnknown, kAll, kPairs = 10, kNextGradient, kGradientMin = 100, kGradientDark = kGradientMin, kGradientLight, kGradientGreenToPurple, kGradientYellowToPurple, kGradientBlueToPink, kGradientYellowToGreen, kGradientPurpleToOrange, kGradientYellowToBlue, kGradientYellowToBlueLight, kGradientYellowToBlueDark, kGradientMax } |
Functions | |
std::string | getNextColour (Lox::VStr &v) |
Get the next available colour from the specified set. More... | |
Lox::VStr | getNextGradient (const bool reverse=false, const size_t skip=0) |
Get the next gradient set. More... | |
std::string | getRandomColour (void) |
Get a random colour from all the known colours. More... | |
std::string | getRandomColour (Lox::VStr &v) |
Get a random colour from the specified set. More... | |
Lox::VStr | getRandomGradient (const size_t skip=0) |
Get a random gradient set. More... | |
Lox::VStr | getSet (const EType type, const bool reverse=false, const size_t skip=0) |
Get a pre-defined colour set. More... | |
Several simple methods to handle collections of similar colours.
enum Lox::Colours::EType |
std::string Lox::Colours::getNextColour | ( | Lox::VStr & | v | ) |
Get the next available colour from the specified set.
If the vector is empty (no colours remain) then automatically calls getRandomGradient() to repopulate the vector.
References getRandomGradient().
Lox::VStr Lox::Colours::getNextGradient | ( | const bool | reverse = false , |
const size_t | skip = 0 |
||
) |
Get the next gradient set.
References getSet(), kGradientMax, kGradientMin, and lastUsedGradient.
std::string Lox::Colours::getRandomColour | ( | void | ) |
Get a random colour from all the known colours.
References vAllColours.
std::string Lox::Colours::getRandomColour | ( | Lox::VStr & | v | ) |
Get a random colour from the specified set.
If the vector is empty (no colours remain) then automatically calls getRandomGradient() to repopulate the vector.
References initialize(), Lox::Numbers::random(), and vAllColours.
Lox::VStr Lox::Colours::getRandomGradient | ( | const size_t | skip = 0 | ) |
Get a random gradient set.
References getSet(), kGradientMax, kGradientMin, lastUsedGradient, and Lox::Numbers::random().
Referenced by getNextColour().
Lox::VStr Lox::Colours::getSet | ( | const EType | type, |
const bool | reverse = false , |
||
const size_t | skip = 0 |
||
) |
Get a pre-defined colour set.
References initialize(), kAll, kGradientBlueToPink, kGradientDark, kGradientGreenToPurple, kGradientLight, kGradientPurpleToOrange, kGradientYellowToBlue, kGradientYellowToBlueDark, kGradientYellowToBlueLight, kGradientYellowToGreen, kGradientYellowToPurple, kPairs, lastUsedGradient, vAllColours, vBlueToPink, vColourPairs, vDark, vGreenToPurple, vLight, vPurpleToOrange, vYellowToBlue, vYellowToBlueDark, vYellowToBlueLight, vYellowToGreen, and vYellowToPurple.
Referenced by getNextGradient(), and getRandomGradient().