summaryrefslogtreecommitdiff
path: root/log/main.c
diff options
context:
space:
mode:
authorEnrique2025-01-06 00:50:11 +0100
committerEnrique2025-01-06 00:50:11 +0100
commit789169d70d24ff2c1c9804f0149d0508de6dfcfa (patch)
tree088ec2ce664a13aeeb3603d0eee6c737caff7190 /log/main.c
downloadsoikk-libs-789169d70d24ff2c1c9804f0149d0508de6dfcfa.tar.xz
soikk-libs-789169d70d24ff2c1c9804f0149d0508de6dfcfa.tar.zst
First upload
Diffstat (limited to 'log/main.c')
-rwxr-xr-xlog/main.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/log/main.c b/log/main.c
new file mode 100755
index 0000000..47ae6f7
--- /dev/null
+++ b/log/main.c
@@ -0,0 +1,22 @@
+#define COLOR
+#include "log.h"
+
+
+int main(void){
+
+ int r, g, b;
+ while(1){
+ printf("select RBG trio: ");
+ scanf("%d %d %d", &r, &g, &b);
+ if(r > 255) r = 255;
+ if(g > 255) g = 255;
+ if(b > 255) b = 255;
+ printf("%d %d %d\n", r, g, b);
+ printf("\t\e[38;2;%d;%d;%dmDEBUG%s\n", r, g, b, CRESET);
+ printf("\t\e[38;2;%d;%d;%dmINFO%s\n", r, g, b, CRESET);
+ printf("\t\e[38;2;%d;%d;%dmWARN%s\n", r, g, b, CRESET);
+ printf("\t\e[38;2;%d;%d;%dmERROR%s\n", r, g, b, CRESET);
+ }
+
+ return 0;
+}