Skip to content

A 130 lines header for coloring your terminal outputs

License

Notifications You must be signed in to change notification settings

matovitch/trmclr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

trmclr

A 130 lines header for coloring your terminal outputs

Example

#include "trmclr.hpp"
#include <iostream>

int main()
{
    trmclr::Style fancyStyle(trmclr::Background::LIGHT_BLUE    |
                             trmclr::Foreground::WHITE         |
                             trmclr::Attribute::UNDERLINED     |
                             trmclr::Attribute::BOLD);

    trmclr::Style basicStyle(trmclr::Attribute::DEFAULT);

    std::cout << fancyStyle << "Hello " 
              << basicStyle << "World!" << std::endl;

    return 0;
}

/*
Note you can also do things like: 
auto bold = [](trmclr::Style style) { return trmclr::Style(style | trmclr::Attribute::BOLD); };
*/

About

A 130 lines header for coloring your terminal outputs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages