Epic interview question

(RGB) hexadecimal parser.