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; }
π¨ Examples
This project includes two examples:
- A console-based demo for quick testing.
- An ImGui-based GUI demo using the ImGui framework.
If you have ImGui set up, you can experiment with color generation parameters interactively.
β οΈ Limitations
Currently, this utility only generates colors in RGB format.

