feature: add terminal color block to palette output

This commit is contained in:
2026-01-31 17:44:50 +03:00
parent 84e4ddb4cf
commit c500a00828
+4 -1
View File
@@ -7,6 +7,7 @@
#include <vector> #include <vector>
#include <unordered_map> #include <unordered_map>
#include <algorithm> #include <algorithm>
#include <cstdio>
using std::cout; using std::cout;
namespace fs = std::filesystem; namespace fs = std::filesystem;
@@ -145,7 +146,9 @@ int main(int argc, char *argv[]) {
int g = b.g / b.count; int g = b.g / b.count;
int bcol = b.b / 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); stbi_image_free(data);