PandaScience / FortySecondsCV

A highly customizable and improved version of Carmine Spagnuolo's Twenty Seconds Curriculum Vitae.
BSD 3-Clause "New" or "Revised" License
215 stars 66 forks source link

Suggestion: color chartlabels #35

Closed ninohardt closed 3 years ago

ninohardt commented 3 years ago

Just an idea: When you have a lot of chartlabel elements, adding some color to group them into categories might be helpful. I'd suggest using very soft colors here. Anyway, if you wanted to do that, the chartlabelcolor function would be helpful. It defaults to the standard skillbg color.

\newcommand{\chartlabelcolor}[2][skillbg]{%
    \begin{tikzpicture}
        \node[
        fill=#1!25, % interior color
        anchor=base,
        draw=#1, % line color
        rounded corners,
        inner xsep=1ex, % distance from left/right border to text
        inner ysep=0.75ex, % distance top/bottom border to text
        text height=1.5ex, % align text vertically in box (at least as resulting
        text depth=.25ex   % effect)
        ]{\sidetext{#2}};%
    \end{tikzpicture}
}
PandaScience commented 3 years ago

Yeah, I like that idea. :+1:

PandaScience commented 3 years ago

Implemented in f1e13fd as backwards-compatible replacement for the old \chartlabel command.

NOTE: Could be replaced in a future commit with a more versatile key-value argument list if necessary.