Is there a way to determine the closest hex values for foreground colours provided by tput ?
tput
ff0000
#ff0000
\e
\033
tohex
ff0000
– Vera Apr 12 '23 at 23:04#ff0000
. – Vera Apr 12 '23 at 23:41\e
or\033
. – Vera Apr 13 '23 at 00:21tohex
function in accepted answer to the duplicate Q&A. Also check the answer by ThomasDickey there (he's the maintainer of xterm and ncurses (where your tput likely comes from)) – Stéphane Chazelas Apr 13 '23 at 05:47