Got it!
I included the MWE with some minor changes, but all are commented.
Changes I made are:
- sans-serif font in white, small, everything centered
- size of the thumb index is now one xth of the page height (A4 paper)
- custom colors defined
- vertical shift of the thumb index box equals the height of the box
- width is a little smaller (1.5cm)
Hope this helps for anyone who encounters this as well. :-)
\documentclass[a4paper]{report}
\usepackage{background}
\usetikzlibrary{calc}
\usepackage{ifthen}
\usepackage{lipsum}
\usepackage{xcolor}
\pagestyle{plain}
% define custom colors in hex code here:
\definecolor{Thumb1}{HTML}{FB8500}
\definecolor{Thumb2}{HTML}{FD9E02}
\definecolor{Thumb3}{HTML}{FFB703}
\definecolor{Thumb4}{HTML}{817425}
\definecolor{Thumb5}{HTML}{425236}
\definecolor{Thumb6}{HTML}{023047}
\definecolor{Thumb7}{HTML}{219EBC}
\definecolor{Thumb8}{HTML}{58B4D1}
\definecolor{Thumb9}{HTML}{8ECAE6}
% background common settings
\SetBgScale{1}
\SetBgAngle{0}
\SetBgOpacity{1}
\SetBgContents{}
% auxiliary counter
\newcounter{chapshift}
\addtocounter{chapshift}{-1}
% the list of colors to be used (add more if needed)
\newcommand\BoxColor{%
\ifcase\thechapshift Thumb1\or Thumb2\or Thumb3\or Thumb4\or Thumb5\or Thumb6\or Thumb7\or Thumb8\else Thumb9\fi}
% the main command; the mandatory argument sets the color of the vertical box; the value 3.3cm is for A4 document size and 9 chapters, change accordingly (divide document height in cm by total no. of chapters)
\makeatletter
\newcommand\ChapFrame{%
\AddEverypageHook{%
\ifthenelse{\isodd{\thepage}}
{\SetBgContents{%
\begin{tikzpicture}[overlay,remember picture]
\node[fill=\BoxColor,inner sep=0pt,rectangle,text width=1.5cm, % 1.5cm is the width of the box
text height=3.3cm,align=center,anchor=north east]
at ($ (current page.north east) + (-0cm,-3.3*\thechapshift cm) $)
{\rotatebox{90}{\parbox[c][1.5cm][c]{3.3cm}{%
\center\textcolor{white}{\textsf{\scriptsize{\MakeUppercase{\textbf{\leftmark}}}}}}}};
\end{tikzpicture}}%
}
{\SetBgContents{%
\begin{tikzpicture}[overlay,remember picture]
\node[fill=\BoxColor,inner sep=0pt,rectangle,text width=1.5cm, % 1.5cm is the width of the box
text height=3.3cm,align=center,anchor=north west]
at ($ (current page.north west) + (-0cm,-3.3*\thechapshift cm) $)
{\rotatebox{90}{\parbox[c][1.5cm][c]{3.3cm}{%
\center\textcolor{white}{\textsf{\scriptsize{\MakeUppercase{\textbf{\leftmark}}}}}}}};
\end{tikzpicture}}
}
\bg@material}%
\stepcounter{chapshift}
}
\makeatother
% redefinition of \chaptermark to contain only the title
\renewcommand\chaptermark[1]{\markboth{\thechapter.~#1}{}}
\begin{document}
\chapter[intro]{Introduction}
\ChapFrame
\lipsum[1-7]
\chapter{Results}
\ChapFrame
\lipsum[1-7]
\chapter{Discussion}
\ChapFrame
\lipsum[1-7]
\end{document}