rgb to hex
This commit is contained in:
parent
dd2e9f4a38
commit
00395e9111
12
~/C/rgbToHex.c
Normal file
12
~/C/rgbToHex.c
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#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);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user