[Tex/LaTex] bold a defined color

color

Here is one of my custom colors that is "light blue". Sometimes it comes up very skinny on the text

\definecolor{lb}{RGB}{44, 139, 183}

Is there an easier way to bold or thicken the font of a \definecolor such that I don't have to manually change every \textcolor{lb}{}to \textcolor{lb}{\textbf{text goes here}}?

Best Answer

By "bolding" the color of some text, I assume you mean to give the text thicker strokes but without switching to bold-extended type.

If this assumption is correct, the following solution may be of interest to you.

enter image description here

Note that the bold colored parts have (almost) the same widths that the regular-weight colored parts have.

\documentclass{article}
\usepackage{xcolor}
\definecolor{lb}{RGB}{44, 139, 183}
\newcommand\cl[2]{\textcolor{#1}{#2}}
\newcommand\bcl[2]{\textcolor{#1}{{\fontseries{b}\selectfont #2}}}

\begin{document}
\cl{lb}{Hello World.}

\bcl{lb}{Hello World.}

Hello World.

\cl{red}{Good bye.}

\bcl{red}{Good bye.}
\end{document} 
Related Question