snipplets.dev/snipplets/code/C/rgbToHex.c
2023-08-05 22:45:06 +03:00

13 lines
195 B
C

#include <stdio.h>
int main(int argc, char const *argv[])
{
int red = 0;
int green = 128;
int blue = 64;
printf("#%.2x%.2x%.2x\n", red, green, blue); //#008040
return 0;
}