Let me introduce “coloro” — a simple console tool for output text with highlighted hex colors. I wrote it when playing with my polybar and bspwm design.
Source available at
It can highlight text from arg
Highlight text from a file
Highlight text from pipe
And even highlight a text from clipboard
( -n option allow to parse colors without hashtag prefix )