CPPConsole
Loading...
Searching...
No Matches
color.hpp File Reference
#include <iostream>
#include <string>
#include "ansi.hpp"
#include "graphics.hpp"
Include dependency graph for color.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  console
 Namespace Containing all console commands.
 

Functions

std::string colorize (const std::string &str, Graphics color)
 Colors the text color to a predefined color.
 
std::string colorize (const std::string &str, unsigned char color, bool foreground=true)
 Colors the text color to a custom color, between 0 to 255.
 
std::string colorize (const std::string &str, unsigned char r, unsigned char g, unsigned char b, bool foreground=true)
 Colors the text color to a custom RGB color.
 
void setColor (Graphics color)
 Sets the color of the text to a predefined color.
 
void setColor (unsigned char color, bool foreground=true)
 Sets the color of the text to a custom color, between 0 to 255.
 
void setColor (unsigned char r, unsigned char g, unsigned char b, bool foreground=true)
 Sets the color of the text to a custom RGB color.