Background
I wish to create a LaTeX version of a color palette similar to the one found here: https://codepen.io/devi8/pen/nJMGZR. It looks like this:
I have managed to find code to build on, but I am stuck on two issues:
- How do I use CMYK instead of RGB in the MWE?
- How can I divide each box into two boxes and add a shadow border to each?
Minimal Working Example (MWE)
\documentclass{article}
\usepackage{xcolor,stackengine}
\newcommand\palbox[2]{{\sffamily\fboxsep=10pt\relax\fboxrule=0pt\relax\footnotesize%
\fcolorbox{gray!50}{gray!10}{%
\stackengine{8pt}{%
\colorbox[RGB]{#1}{\rule{60pt}{0pt}\rule{0pt}{60pt}}%
}{%
\color{black!60}\stackengine{6pt}{##2}{\saycolors{#1}}{U}{l}{F}{F}{S}%
}{U}{l}{F}{F}{S}%
}%
}}
\newcommand\saycolors[1]{\saycolorsaux#1\relax}
\def\saycolorsaux#1 #2 #3\relax{R:#1 G:#2 B:#3}
\begin{document}
\palbox{1 103 143}{01678f}\quad
\palbox{221 109 16}{dd6d10}\quad
\palbox{18 54 69}{123645}\quad
\palbox{120 121 124}{78797c}
\end{document}
Current output
Desired output
Two CMYK colors next to each other in one box with shadow.



\documentclassand the color are not rendered good. Is it possible to force\definecolorto use RGB? – kexxcream May 08 '22 at 11:34\selectcolormodel{RGB}to change color model. – kexxcream May 08 '22 at 11:44