this.answer is NOT SUITED for numbers that are lower then 0x010000, it converts to number which css doesn't understands, for example black 0x000000 > is 0 that's where padStart(6, '0') comes in handy
"#" + 0x000000.toString(16).padStart(6, '0')
but i bet there is a better way, but can't find it, hoping for an answer from the far future