This is an example of how to use the ColRGB struct.
#include "../include/termstyle.hpp"
int main()
{
int r, g, b;
std::cout << "Enter RGB values (0-255): ";
std::cin >> r >> g >> b;
.
text =
"R=" + std::to_string(r) +
" G=" + std::to_string(g) +
" B=" + std::to_string(b) +
": ",
},
.suffix = {
.text = " ",
}
};
return 0;
}
void addPreset(std::string name, PresetConfig preset)
Adds a preset with the given name and configuration.
Definition termstyle.hpp:634
void print(std::string preset, std::string text="")
Definition termstyle.hpp:666
Namespace for the termstyle library.
Definition termstyle.hpp:116
Struct for storing RGB color codes.
Definition termstyle.hpp:332
Struct for storing different types of colors.
Definition termstyle.hpp:384
Struct for storing preset configurations.
Definition termstyle.hpp:512
StyleString prefix
Definition termstyle.hpp:514
std::string text
Definition termstyle.hpp:421