Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronlyy committed Apr 7, 2023
1 parent 5ae273e commit d9991b1
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,20 @@ Kolor adds colored text to your terminal output using ANSI escape codes.

int main() {

// Setting colors manually
std::cout << kolor::ESCAPE << kolor::FOREGROUND << kolor::format_rgb(200, 20, 50) << kolor::M << "Test string\n" << kolor::RESET;
// set colors using constants
std::cout << kolor::ESCAPE << kolor::FOREGROUND << kolor::format_rgb(200, 20, 50) << kolor::M << "Change colors using constants\n" << kolor::RESET;

// Set color semi-manually
std::cout << kolor::set_fg(100,23,66) << "Yet another test string\n" << kolor::RESET;
// set colors using inline set functions
std::cout << kolor::set_fg(100, 23, 66) << "Change color using inline set functions\n" << kolor::RESET;

// Using builtin print function
kolor::print_bg("Another test string\n", 23, 123, 90);
// use print_bg function to change the background
kolor::print_bg("Change background using print_bg\n", 23, 123, 90);

// use print_fg function to change the foreground
kolor::print_fg("Change background using print_fg\n", 23, 123, 90);

// use print function to change background and foreground of an output
kolor::print("use print function to change background and foreground", 144, 252, 3, 3, 140, 252);

// reset everything
std::cout << kolor::RESET;
Expand Down

0 comments on commit d9991b1

Please sign in to comment.