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 https://github.com/Insolita/coloro
It can highlight text from arg
Highlight text from pipe
And even highlight text from clipboard
( -n option allow to parse colors without hashtag prefix )