42 lines
953 B
C++
42 lines
953 B
C++
//
|
|
// Created by maxine on 7/1/24.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <format>
|
|
#include <vector>
|
|
#include "Color3.hpp"
|
|
#include "Color4.hpp"
|
|
#include "Colors.hpp"
|
|
#include "AnsiEscapeCodes.hpp"
|
|
|
|
namespace mcolor {
|
|
std::string toEscapeCode(Color4 c, bool bg=false);
|
|
|
|
std::string toEscapeCode(AnsiColor c);
|
|
|
|
|
|
/// Performs a hack that allows the windows console to interpret ANSI codes.
|
|
/// @note This only works on Windows 10 version 1511 and newer.
|
|
void windowsSaneify();
|
|
|
|
|
|
void printAnsiColorTable();
|
|
|
|
std::vector<uint8_t> createRGBScale(uint8_t startValue = 200, uint8_t increment = 5);
|
|
|
|
std::vector<Color4> redScaler(Color4 c);
|
|
|
|
std::vector<Color4> greenScaler(Color4 c);
|
|
|
|
std::vector<Color4> blueScaler(Color4 c);
|
|
|
|
std::vector<Color4> RGBColorScale(Color4 startingColor, std::vector<Color4> (*scaler)(Color4));
|
|
|
|
void printRGBScale(std::vector<Color4> cs);
|
|
|
|
void printRGBConsoleTest();
|
|
}
|