From c500a0082876cefd0bf3159e25b19b0d0cb0b0a2 Mon Sep 17 00:00:00 2001 From: murat Date: Sat, 31 Jan 2026 17:44:50 +0300 Subject: [PATCH] feature: add terminal color block to palette output --- main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 195b4da..cd343f7 100644 --- a/main.cpp +++ b/main.cpp @@ -7,6 +7,7 @@ #include #include #include +#include using std::cout; namespace fs = std::filesystem; @@ -145,7 +146,9 @@ int main(int argc, char *argv[]) { int g = b.g / b.count; int bcol = b.b / b.count; - printf("#%02X%02X%02X\n", r, g, bcol); + printf("\033[48;2;%d;%d;%dm \033[0m #%02X%02X%02X\n", + r, g, bcol, + r, g, bcol); } stbi_image_free(data);