commit 265452d7180b0c4bd910b64b0995cf769af4b328
parent a9e6a2063603bd10e8f7a5e96fb4f2d5c3492662
Author: Mateusz Baran <mbaran@MacBaran.local>
Date:   Thu,  4 Apr 2024 21:08:43 +0200
fix: #3 icons appear black instead white in PDF conversion
Diffstat:
12 files changed, 25 insertions(+), 62 deletions(-)
diff --git a/README.md b/README.md
@@ -15,7 +15,7 @@ BubbleCV is designed to effectively showcase your skills, work experience, educa
 
 - Easy Extensibility – You have the option to upload your own [resources](resources/), such as icons, to further personalize your CV and make it unique to your style.
 
-- Configurable Colors – The bubbles and icons in the template can be easily changed with a single line of code. By adjusting the RGB color parameters, you can customize the appearance to suit your preferences.
+- Configurable Colors – The bubbles in the template can be easily changed with a single line of code. By adjusting the RGB color parameters, you can customize the appearance to suit your preferences.
 
 - Functionalities for Content Management – The template provides functions that facilitate the easy addition of features and the management of content, ensuring a seamless CV creation process.
 
@@ -25,9 +25,9 @@ Open the template in [Overleaf](https://www.overleaf.com/latex/templates/bubblec
 
 ## Functions
 
-- `\begin{cv}[<avatar>][<avatar_scale>][<avatar_color>]{<name>}{<description>}`: Creates the main CV environment with optional parameters for avatar image, scale, and color. It also includes the name and description of the individual.
+- `\begin{cv}[<avatar>][<avatar_scale>]{<name>}{<description>}`: Creates the main CV environment with optional parameters for avatar image and scale. It also includes the name and description of the individual.
 
-- `\cvsection[<icon>][<icon_scale>][<icon_color>]{<section_title>}`: Creates a new section with an optional icon, scale, and color parameters. It helps in organizing different parts of the CV, such as Profile, Work Experience, Education, etc.
+- `\cvsection[<icon>][<icon_scale>]{<section_title>}`: Creates a new section with an optional icon and scale parameters. It helps in organizing different parts of the CV, such as Profile, Work Experience, Education, etc.
 
 - `\begin{cvevent}[<start_date>][<end_date>]`: Begins a new work experience or educational event. Optional start and end dates can be specified to indicate the duration of the event.
 
diff --git a/bubblecv.sty b/bubblecv.sty
@@ -77,7 +77,6 @@
 %----------------------------------------------------------------------------------------
 \usepackage{xcolor}
 \definecolor{cvcolor}{RGB}{20, 20, 20}                      % main color
-\definecolor{cviconcolor}{RGB}{255, 255, 255}               % icon color
 \definecolor{cvbordercolor}{RGB}{255, 255, 255}             % border color
 \definecolor{cvavatarbordercolor}{RGB}{255, 255, 255}       % avatar border color
 \definecolor{cvtimelinecolor}{RGB}{0, 0, 0}                 % timeline color
@@ -165,62 +164,29 @@
 \setlength{\skip\footins}{0.25\baselineskip}
 
 %----------------------------------------------------------------------------------------
-% RGB TO ARRAY
-%----------------------------------------------------------------------------------------
-% Convert RGB to decode array.
-% Parameter 1:              RGB color.
-% Parameter 2:              Variable to which the array will be assigned.
-\newcommand{\rgbtoarray}[2]{%
-  \extractcolorspecs{#1}\ParseResultModel\ParseResultColor%
-  \convertcolorspec\ParseResultModel\ParseResultColor{rgb}\ParseRgb%
-  \let#2\@empty%
-  \@for\ParseValue:=\ParseRgb\do{%
-    \edef#2{%
-      #2%
-      \ifx#2\@empty%
-      \else%
-        \space%
-      \fi%
-      \ParseValue\space 1%
-    }%
-  }%
-}%
-
-%----------------------------------------------------------------------------------------
 % DRAW CIRCLE
 %----------------------------------------------------------------------------------------
 % Draw a circle with the image inside.
 % Parameter 1 (optional):   Path to image resource.
 % Parameter 2 (optional):   Image scale.
-% Parameter 3 (optional):   Image color in RGB.
-% Parameter 4:              Circle radius in millimeters.
-% Parameter 5:              Circle border width in millimeters.
-% Parameter 6:              Circle background color in RGB.
-% Parameter 7:              Circle border color in RGB.
-\NewDocumentCommand{\drawcircle}{O{} O{1} O{} m m m m}{%
-    \ifthenelse{\equal{#3}{}}{}{%
-        \rgbtoarray{#3}\customdecodearray%
-    }{}%
+% Parameter 3:              Circle radius in millimeters.
+% Parameter 4:              Circle border width in millimeters.
+% Parameter 5:              Circle background color in RGB.
+% Parameter 6:              Circle border color in RGB.
+\NewDocumentCommand{\drawcircle}{O{} O{1} m m m m}{%
     \begin{tikzpicture}%
         \draw[%
-            draw=#7, fill=#6, line width=#5mm,%
+            draw=#6, fill=#5, line width=#4mm,%
             path picture={%
                 \ifthenelse{\equal{#1}{}}{}{%
                     \node at (path picture bounding box.center){%
-                        \ifthenelse{\equal{#3}{}}{%
-                            \includegraphics[%
-                                width=#2\dimexpr#4mm\relax,%
-                                height=#2\dimexpr#4mm\relax]{#1}%
-                        }{%
-                            \includegraphics[%
-                                width=#2\dimexpr#4mm\relax,%
-                                height=#2\dimexpr#4mm\relax,%
-                                decodearray={\customdecodearray}]{#1}%
-                        }%
+                        \includegraphics[%
+                            width=#2\dimexpr#3mm\relax,%
+                            height=#2\dimexpr#3mm\relax]{#1}%
                     };%
                 }%
             }%
-        ] (0,0) circle (\dimexpr#4mm-#5mm/2\relax);%
+        ] (0,0) circle (\dimexpr#3mm-#4mm/2\relax);%
     \end{tikzpicture}%
 }%
 
@@ -234,10 +200,9 @@
 % Main CV function that prepares the entire layout.
 % Parameter 1 (optional):   Path to avatar resource.
 % Parameter 2 (optional):   Avatar scale.
-% Parameter 3 (optional):   Avatar color in RGB.
-% Parameter 4:              Name.
-% Parameter 5:              Description.
-\NewDocumentEnvironment{cv}{O{} O{2} O{} m m}{%
+% Parameter 3:              Name.
+% Parameter 4:              Description.
+\NewDocumentEnvironment{cv}{O{} O{2} m m}{%
     \relscale{\cvscale}%
     \fontfamily{\cvfont}%
     
@@ -248,13 +213,13 @@
     \begin{minipage}{\dimexpr(\cvavatarradius mm + \cvavatarradius mm)}%
         \protect\ifthenelse{\equal{#1}{}}%
             {\drawcircle{\cvavatarradius}{\cvavatarborderwidth}{cvcolor}{cvavatarbordercolor}}%
-            {\drawcircle[resources/#1][#2][#3]{\cvavatarradius}{\cvavatarborderwidth}{cvcolor}{cvavatarbordercolor}}%
+            {\drawcircle[resources/#1][#2]{\cvavatarradius}{\cvavatarborderwidth}{cvcolor}{cvavatarbordercolor}}%
     \end{minipage}%
     \hspace{\cvheaderoffset mm}%
     \begin{minipage}{\dimexpr(\linewidth + \timelinespace mm - \cvavatarradius mm - \cvheaderoffset mm)}%
-        \textscale{\cvheadertitlefontscale}{#4}%
+        \textscale{\cvheadertitlefontscale}{#3}%
         \cvseparator[3]%
-        \textscale{\cvheadersubtitlefontscale}{#5}%
+        \textscale{\cvheadersubtitlefontscale}{#4}%
     \end{minipage}%
     
     \columnratio{\cvcolumnratio}%
@@ -270,9 +235,8 @@
 % Groups events, items and skills inside one block.
 % Parameter 1 (optional):   Path to icon resource.
 % Parameter 2 (optional):   Icon scale.
-% Parameter 3 (optional):   Icon color in RGB.
-% Parameter 4:              Section title.
-\NewDocumentCommand{\cvsection}{O{} O{1} O{cviconcolor} m}{%
+% Parameter 3:              Section title.
+\NewDocumentCommand{\cvsection}{O{} O{1} m}{%
     \ifthenelse{\equal{\iscvsidebar}{0}}{%
         \vspace{\cvmainspace mm}%
         \hspace{-\timelinespace mm}%
@@ -280,11 +244,11 @@
         \begin{minipage}{\dimexpr(\cvmainbubbleradius mm + \cvmainbubbleradius mm)}%
             \ifthenelse{\equal{#1}{}}%
                 {\protect\drawcircle{\cvmainbubbleradius}{\cvmainbubbleborderwidth}{cvcolor}{cvbordercolor}}%
-                {\protect\drawcircle[resources/#1][#2][#3]{\cvmainbubbleradius}{\cvmainbubbleborderwidth}{cvcolor}{cvbordercolor}}%
+                {\protect\drawcircle[resources/#1][#2]{\cvmainbubbleradius}{\cvmainbubbleborderwidth}{cvcolor}{cvbordercolor}}%
         \end{minipage}%
         \hspace{\dimexpr(\timelinespace mm - \cvmainbubbleradius mm)}%
         \begin{minipage}{\linewidth}%
-            \textscale{\cvsectionfontscale}{\textbf{#4}}%
+            \textscale{\cvsectionfontscale}{\textbf{#3}}%
         \end{minipage}%
         \cvseparator%
     }{%
@@ -293,11 +257,11 @@
         \begin{minipage}{\dimexpr(\cvsidebarbubbleradius mm + \cvsidebarbubbleradius mm)}%
             \protect\ifthenelse{\equal{#1}{}}%
                 {\drawcircle{\cvsidebarbubbleradius}{\cvsidebarbubbleborderwidth}{cvcolor}{cvbordercolor}}%
-                {\drawcircle[resources/#1][#2][#3]{\cvsidebarbubbleradius}{\cvsidebarbubbleborderwidth}{cvcolor}{cvbordercolor}}%
+                {\drawcircle[resources/#1][#2]{\cvsidebarbubbleradius}{\cvsidebarbubbleborderwidth}{cvcolor}{cvbordercolor}}%
         \end{minipage}%
         \hspace{\cvsidebaroffset mm}%
         \begin{minipage}{\dimexpr(\linewidth - \cvsidebarbubbleradius mm - \cvsidebaroffset mm)}%
-            \textscale{\cvsectionfontscale}{\textbf{#4}}%
+            \textscale{\cvsectionfontscale}{\textbf{#3}}%
         \end{minipage}%
         \cvseparator%
     }%
@@ -431,4 +395,3 @@
   \addtocounter{footnote}{-1}%
   \endgroup%
 }%
-
diff --git a/resources/contact.png b/resources/contact.png
Binary files differ.
diff --git a/resources/cv.png b/resources/cv.png
Binary files differ.
diff --git a/resources/education.png b/resources/education.png
Binary files differ.
diff --git a/resources/languages.png b/resources/languages.png
Binary files differ.
diff --git a/resources/person.png b/resources/person.png
Binary files differ.
diff --git a/resources/publications.png b/resources/publications.png
Binary files differ.
diff --git a/resources/skills.png b/resources/skills.png
Binary files differ.
diff --git a/resources/summary.png b/resources/summary.png
Binary files differ.
diff --git a/resources/target.png b/resources/target.png
Binary files differ.
diff --git a/resources/work.png b/resources/work.png
Binary files differ.