<commit_before>//––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––//

#include "dye.hpp"
#include <chrono>
#include <iostream>
#include <iomanip>
#include <thread>

void cadence(size_t ms=750) { std::this_thread::sleep_for(std::chrono::milliseconds(ms)); }

int main() {
	// ––––––––––
	// Basic colors

	std::cout << dye::black("black")     << " "
	          << dye::red("red")         << " "
	          << dye::green("green")     << " "
	          << dye::yellow("yellow")   << " "
	          << dye::blue("blue")       << " "
	          << dye::magenta("magenta") << " "
	          << dye::cyan("cyan")       << " "
	          << dye::white("white")     << "\n\n";

	// –––––––––––––––
	// xterm256 colors

	std::cout << "–––––––––\n"
	             "xterm-256\n\n";

	// Standard colors

	std::cout << "Bright colors: ";
	for (size_t i =  dye::xterm256::STANDARD_DIM_START ;
		        i <= dye::xterm256::STANDARD_DIM_END ;
		      ++i)
		std::cout << dye::bg256(i)("     ");
	std::cout << "\n               ";
	for (size_t i =  dye::xterm256::STANDARD_DIM_START ;
		        i <= dye::xterm256::STANDARD_DIM_END ;
		      ++i)
		std::cout << std::setw(5) << std::left << i;

	std::cout << "\n";

	std::cout << "Dim colors:    ";
	for (size_t i =  dye::xterm256::STANDARD_BRIGHT_START ;
		        i <= dye::xterm256::STANDARD_BRIGHT_END ;
		      ++i)
		std::cout << dye::bg256(i)("     ");
	std::cout << "\n               ";
	for (size_t i =  dye::xterm256::STANDARD_BRIGHT_START ;
		        i <= dye::xterm256::STANDARD_BRIGHT_END ;
		      ++i)
		std::cout << std::setw(5) << std::left << i;

	std::cout << "\n\n";

	// Extended colors

	std::cout << "Extended colors:\n";

	for (size_t r=0; r<dye::xterm256::EXTENDED_LEVELS; ++r) {
		std::cout << "\n" << std::setw(3) << dye::xterm256::EXTENDED_START + r*36 << "  ";
		for (size_t g=0; g<dye::xterm256::EXTENDED_LEVELS; ++g)
			for (size_t b=0; b<dye::xterm256::EXTENDED_LEVELS; ++b)
				std::cout << dye::bg256(dye::xterm256::EXTENDED_START + r*36 + g*6 + b)("   ");
	}

	std::cout << "\n";
	std::cout << "   + ";
	for (size_t offset=0; offset<std::pow(dye::xterm256::EXTENDED_LEVELS,2); ++offset)
		std::cout << std::setw(3) << offset;

	std::cout << "\n\n";

	// Gray colors

	std::cout << "Gray colors:\n\n";

	for (size_t i=dye::xterm256::GREY_START; i<=dye::xterm256::GREY_END; ++i)
		std::cout << dye::bg256(i)("    ");
	std::cout << "\n";
	for (size_t i=dye::xterm256::GREY_START; i<=dye::xterm256::GREY_END; ++i)
		std::cout << std::setw(4) << i;

	std::cout << "\n\n";

	// –––––––––––––
	// 24-bit colors

	std::cout << "–––––––––––––––––––––\n"
	             "24-bit (if available)\n\n";

	for (size_t r=0; r<256; r+=15) {
		for (size_t g=0; g<256; g+=24)
			for (size_t b=0; b<256; b+=24)
				std::cout << dye::bg256(r,g,b)(" ");
		std::cout << "\n";
	}

	std::cout << "\n";

	for (size_t r=0; r<256; r+=15) {
		for (size_t g=0; g<256; g+=24)
			for (size_t b=0; b<256; b+=24)<commit_msg>Clarify example<commit_after>//––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––//

#include "dye.hpp"
#include <chrono>
#include <iostream>
#include <iomanip>
#include <thread>

void cadence(size_t ms=750) { std::this_thread::sleep_for(std::chrono::milliseconds(ms)); }

int main() {
	// ––––––––––
	// Basic colors

	std::cout << dye::black("black")     << " "
	          << dye::red("red")         << " "
	          << dye::green("green")     << " "
	          << dye::yellow("yellow")   << " "
	          << dye::blue("blue")       << " "
	          << dye::magenta("magenta") << " "
	          << dye::cyan("cyan")       << " "
	          << dye::white("white")     << "\n\n";

	// –––––––––––––––––––––––
	// xterm256 indexed colors

	std::cout << "––––––––––––––––––––––––\n"
	             "xterm-256 indexed colors\n\n";

	// Standard colors

	std::cout << "Bright colors: ";
	for (size_t i =  dye::xterm256::STANDARD_DIM_START ;
		        i <= dye::xterm256::STANDARD_DIM_END ;
		      ++i)
		std::cout << dye::bg256(i)("     ");
	std::cout << "\n               ";
	for (size_t i =  dye::xterm256::STANDARD_DIM_START ;
		        i <= dye::xterm256::STANDARD_DIM_END ;
		      ++i)
		std::cout << std::setw(5) << std::left << i;

	std::cout << "\n";

	std::cout << "Dim colors:    ";
	for (size_t i =  dye::xterm256::STANDARD_BRIGHT_START ;
		        i <= dye::xterm256::STANDARD_BRIGHT_END ;
		      ++i)
		std::cout << dye::bg256(i)("     ");
	std::cout << "\n               ";
	for (size_t i =  dye::xterm256::STANDARD_BRIGHT_START ;
		        i <= dye::xterm256::STANDARD_BRIGHT_END ;
		      ++i)
		std::cout << std::setw(5) << std::left << i;

	std::cout << "\n\n";

	// Extended colors

	std::cout << "Extended colors:\n";

	for (size_t r=0; r<dye::xterm256::EXTENDED_LEVELS; ++r) {
		std::cout << "\n" << std::setw(3) << dye::xterm256::EXTENDED_START + r*36 << "  ";
		for (size_t g=0; g<dye::xterm256::EXTENDED_LEVELS; ++g)
			for (size_t b=0; b<dye::xterm256::EXTENDED_LEVELS; ++b)
				std::cout << dye::bg256(dye::xterm256::EXTENDED_START + r*36 + g*6 + b)("   ");
	}

	std::cout << "\n";
	std::cout << "   + ";
	for (size_t offset=0; offset<std::pow(dye::xterm256::EXTENDED_LEVELS,2); ++offset)
		std::cout << std::setw(3) << offset;

	std::cout << "\n\n";

	// Gray colors

	std::cout << "Gray colors:\n\n";

	for (size_t i=dye::xterm256::GREY_START; i<=dye::xterm256::GREY_END; ++i)
		std::cout << dye::bg256(i)("    ");
	std::cout << "\n";
	for (size_t i=dye::xterm256::GREY_START; i<=dye::xterm256::GREY_END; ++i)
		std::cout << std::setw(4) << i;

	std::cout << "\n\n";

	// ––––––––––––––––––
	// RGB-triplet colors

	std::cout << "–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––\n"
	             "RGB-triplets (24-bit if available, xterm256 approximation fallback)\n\n";

	for (size_t r=0; r<256; r+=15) {
		for (size_t g=0; g<256; g+=24)
			for (size_t b=0; b<256; b+=24)
{'fraction_non_alphanumeric': 0.28111298482293423, 'fraction_numerical': 0.04148397976391231, 'mean_word_length': 3.127348643006263, 'pattern_counts': {'":': 0, '<': 242, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6662726', 'n_tokens_mistral': 2986, 'n_tokens_neox': 2342, 'n_words': 392}