Convert RGB to HEX

When given a RGB as their own inputs, output the relating hex code.

IN

255
255
0

OUT

FFFF00

IN

255
0
0

OUT

FF0000

IN

255
255
255

OUT

FFFFFF

IN

204
102
153

OUT

CC6699

IN

51
51
255

OUT

3333FF

IN

3
56
72

OUT

033848

IN

144
228
254

OUT

90E4FE

IN

255
198
121

OUT

FFC679

IN

255
250
66

OUT

FFFA42

IN

228
59
126

OUT

E43B7E

IN

103
156
52

OUT

679C34

IN

55
28
135

OUT

371C87

IN

253
107
0

OUT

FD6B00

IN

0
255
255

OUT

00FFFF
Login to submit solution


13 symbols pyth
Sun Apr 1 01:17:37 2018 Sait2000
V3pr.[\02.HE1
16 symbols pyth
Mon Mar 26 23:21:49 2018 GolfingSuccess
sm.[\02r.Hd1[QEE
17 symbols perl
Mon Feb 19 15:55:57 2018 k-mx
#!/usr/bin/perl -n
printf'%02X',$_
19 symbols perl
Mon Feb 19 15:55:11 2018 k-mx
#!/usr/bin/perl -n
printf('%02X',$_)
123 symbols haskell
Wed Sep 19 10:52:15 2018 YoshikuniJujo
import Data.Char
import Numeric
main=interact$(>>=(map toUpper.c.(`showHex`"").read)).lines
c s=replicate(2-length s)'0'++s
124 symbols haskell
Wed Sep 19 10:51:12 2018 YoshikuniJujo
import Data.Char
import Numeric
main=interact$(>>= (map toUpper.c.(`showHex`"").read)).lines
c s=replicate(2-length s)'0'++s

View all solutions