Skip to content

xuboying/randomcolor-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

  • 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.

ImGui Demo


⚠️ Limitations

Currently, this utility only generates colors in RGB format.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published