自定义第四秒简历中的图标颜色

自定义第四秒简历中的图标颜色

我正在用这个做我的简历模板(main.tex)并且我希望在名称、语言点、硬技能和软技能下方的图标“包”有四种不同的颜色,就像下面的图片一样。

在此处输入图片描述

我找到了将所有图标设置为相同颜色的命令行,但我认为我必须修改几件事才能得到我想要的,只是我不知道该怎么做

% uniform icon style for all skill icons, e.g. flags or fontawesome icons
\newcommand{\cvicon}[1]{\makebox[1em]{\color{iconcolor} #1}}
\newcommand{\flag}[1]{\includegraphics[align=c, width=1em]{#1}}

另外,我还想要像下图这样的右侧标题,但我仍然不明白如何做

在此处输入图片描述

非常感谢您的帮助 :)

答案1

为了获得这种风格

C

添加此代码后\documentclass[ a4paper ]{fortysecondscv},选择你喜欢的颜色,更改六种颜色中的任意一种

\definecolor{<color name>}[rgb]{0...1, 0...1, 0...1}

%%**********************************************************
\definecolor{socialnetwork}{rgb}{1,0.5,1}
\definecolor{personalinner}{rgb}{0.8,0.8,0.8}
\definecolor{personalicon}{rgb}{1,0,0}
\definecolor{softskills}{rgb}{0.8,0.3,0.2}
\definecolor{hardskills}{rgb}{0.2,0.8,0.8}
\definecolor{languages}{rgb}{0.0,0.8,0.0}

%% ************* Personal data <<<<<<<<<<<<<<<<<
\renewcommand*\circleicon[1]{%
    \tikz[baseline = (char.base)]{%
        \node[%
        shape=circle,%
        inner sep=1pt,%
        fill=personalinner,% 
        text=personalicon,%
        minimum size=\hsize%
        ] (char) {#1};%
    }%
}

%*****************  social network <<<<<<<<<<<<<<<<
\renewcommand*{\socialicon}[1]{%
    \resizebox{\hsize}{!}{\textcolor{socialnetwork}{#1}}%
}

% ******************* soft skills <<<<<<<<<<<<<<<<<<<<<<<<<
\renewcommand{\cvicon}[1]{\makebox[1em]{\color{softskills} #1}}

% ******************* hardskills <<<<<<<<<<<<<<<<<<<<<<<<<
\newcommand{\cviconx}[1]{\makebox[1em]{\color{hardskills} #1}}
\renewcommand{\skill}[3][0em]{
    \hspace{#1} \cviconx{#2} ~ \parbox{\linewidth-#1-2.5em}{#3} \hfill \par
}
%************************  languages <<<<<<<<<<<<<<<<<<<<<<<<<,
\RenewDocumentCommand{\pointskill}{ O{0em} m m m O{5} }{%
    \hspace{#1} \cvicon{#2} ~ #3 \hfill%
    \foreach \x in {1,...,#5}{%
        \space%
        {\ifnumgreater{\x}{#4}{\color{skillbg}}{\color{languages}}% 
            \raisebox{0.5\height-0.4ex}{\scriptsize\faCircle}%
        }
    }\par%
}

%*****************************************************************************************

更新这是用于快速尝试新颜色的最少代码。

\documentclass[ a4paper ]{fortysecondscv}

%%********************************************* CHOOSE THE COLORS HERE<<<<<
\definecolor{socialnetwork}{rgb}{1,0.5,1}
\definecolor{personalinner}{rgb}{0.8,0.8,0.8}
\definecolor{personalicon}{rgb}{1,0,0}
\definecolor{softskills}{rgb}{0.8,0.3,0.2}
\definecolor{hardskills}{rgb}{0.7,0.8,0.0}
\definecolor{languages}{rgb}{0.0,0.8,0.0}

%% ************* Personal data <<<<<<<<<<<<<<<<<
\renewcommand*\circleicon[1]{%
    \tikz[baseline = (char.base)]{%
        \node[%
        shape=circle,%
        inner sep=1pt,%
        fill=personalinner,% 
        text=personalicon,%
        minimum size=\hsize%
        ] (char) {#1};%
    }%
}

%*****************  social network <<<<<<<<<<<<<<<<
\renewcommand*{\socialicon}[1]{%
    \resizebox{\hsize}{!}{\textcolor{socialnetwork}{#1}}%
}

% ******************* soft skills <<<<<<<<<<<<<<<<<<<<<<<<<
\renewcommand{\cvicon}[1]{\makebox[1em]{\color{softskills} #1}}

% ******************* hardskills <<<<<<<<<<<<<<<<<<<<<<<<<
\newcommand{\cviconx}[1]{\makebox[1em]{\color{hardskills} #1}}
\renewcommand{\skill}[3][0em]{
    \hspace{#1} \cviconx{#2} ~ \parbox{\linewidth-#1-2.5em}{#3} \hfill \par
}
%************************  languages <<<<<<<<<<<<<<<<<<<<<<<<<,
\RenewDocumentCommand{\pointskill}{ O{0em} m m m O{5} }{%
    \hspace{#1} \cvicon{#2} ~ #3 \hfill%
    \foreach \x in {1,...,#5}{%
        \space%
        {\ifnumgreater{\x}{#4}{\color{skillbg}}{\color{languages}}% 
            \raisebox{0.5\height-0.4ex}{\scriptsize\faCircle}%
        }
    }\par%
}   
%*****************************************************************************************


%-------------------------------------------------------------------------------
%                            PERSONAL INFORMATION
%-------------------------------------------------------------------------------

\cvname{Test New Colors}
\cvjobtitle{}
\cvprofilepic{example-image}
\cvbirthday{\today}
\cvaddress{Park Ave.~1, 555 555 B-Woods}
% phone number
\cvphone{+86 555 555 555}
% personal website
\cvsite{https://pandascience.net}
% email address
\cvmail{[email protected]}
% pgp key
\cvkey{4096R/FF00FF00}{0xAABBCCDDFF00FF00}
% any other custom entry
\cvcustomdata{\faFlag}{Chinese}

%-------------------------------------------------------------------------------
%                              SIDEBAR 1st PAGE
%-------------------------------------------------------------------------------
% add more profile sections to sidebar on first page
\addtofrontsidebar{
    \graphicspath{{pics/flags/}}

    \profilesection{Social Network}
        \begin{icontable}{2.5em}{1em}
            \social{\faArchive}
                {https://de.overleaf.com/latex/templates/forty-seconds-cv/pztcktmyngsk}
                {Overleaf Template Link}
            \social{\faGithub}
                {https://github.com/PandaScience/FortySecondsCV}
                {Github Project Page Link}
        \end{icontable}

    \profilesection{Languages}
        \pointskill{\flag{CN.png}}{Chinese}{5}
        \pointskill{\flag{DE.png}}{German}{3}
        \pointskill{\flag{GB.png}}{English}{3}
        \pointskill{\flag{FR.png}}{French}{3}

    \profilesection{Hard Skills}
        \skill{\faBalanceScale}{Sleeping almost all day}
        \skill{\faSitemap}{Eating a lot bamboo sprouts}
        \skill{\faGraduationCap}{Relaxing rest of the day}

    \profilesection{Soft Skills}
        \pointskill{\faHome}{Looking Cute}{4}[4]
        \pointskill{\faChild}{Chillin' hard}{3}[4]
}


\begin{document}

\makefrontsidebar

\end{document} 

相关内容