aboutsummaryrefslogtreecommitdiff
path: root/src/util/color.cpp
blob: 4d50cf515ca8c9d756ff00c0e69d1d40d83d7f9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "color.hpp"

#include <fmt/color.h>

auto get_foreground_esc_seq(const std::uint32_t &color) noexcept -> std::string
{
	return {
		fmt::detail::make_foreground_color<char>(fmt::detail::color_type(color)).begin()};
}

auto get_background_esc_seq(const std::uint32_t &color) noexcept -> std::string
{
	return {
		fmt::detail::make_background_color<char>(fmt::detail::color_type(color)).begin()};
}