GitHub - xuboying/randomcolor-cpp (original) (raw)

Here’s a revised and polished version of your README.md that improves clarity, formatting, and tone while preserving all technical details:


randomcolor-cpp

A C++ port of randomColor (commit 8f970a).

Tested with Visual Studio 2022.


πŸš€ Usage

See main.cpp for a basic usage example.

RandomColor::Options opt; opt.schema = RandomColor::SCHEMA::FULLCOLOR; opt.luminosity = RandomColor::LUMINOSITY::BRIGHT;

auto RG = RandomColor::RandomColorGenerator{opt};

for (int i = 0; i < 20; i++) { auto const& rgb = RG.NextRGB(); int const r = std::get<0>(rgb); int const g = std::get<1>(rgb); int const b = std::get<2>(rgb); std::cout << r << "," << g << "," << b << std::endl; }

Console Output


🎨 Examples

This project includes two examples:

If you have ImGui set up, you can experiment with color generation parameters interactively.

ImGui Demo


⚠️ Limitations

Currently, this utility only generates colors in RGB format.