I've made a bytefield packet (see picture), and I want to color the field with the field 256-bit RSA Signature :
Here is the code I used (from another question) :
\documentclass[10pt,a4paper]{article}
\usepackage[table, usenames,dvips, dvipsnames]{xcolor}
\usepackage{bytefield}
\begin{document}
\begin{bytefield}{32}
\bitheader{0,2,4,16, 31} \\
\bitbox{2}{12} & \bitbox{2}{\textcolor{WildStrawberry}{65}} & \bitbox[lrt]{28}{}\\
\wordbox[lr]{1}{\textcolor{WildStrawberry}{65}-bit EC Public Key}\\
\bitbox[lrb]{5}{} & \bitbox[lrt]{27}{}\\
\wordbox[lr]{3}{256-bit RSA Signature} \\
\bitbox[lrb]{5}{} & \bitbox[lt]{27}{}\\
\end{bytefield}
\end{document}
I have seen the (not so common) trick to color a field in the bytefield package. They create a command to add a colored boxe, like this :
\newcommand{\colorbitbox}[3]{%
\rlap{\bitbox{#2}{\color{#1}\rule{\width}{\height}}}%
\bitbox{#2}{#3}
}%
It works well for classical fields, but the \colorbitbox created doesn't allow \bytefiled with options like [lrb].
How can I do this for a field splitted on multiple lines ?


colorbitboxon a 2 boxes-packet. But the borders around the colored box have disappeared, unless I explicitely say I want them with[lrbt]. I found it odd, it's just that. I tried with this :\begin{bytefield}{32} \bitheader{0-31} \\ \bitbox{4}{Four} & \bitbox{8}{Eight} & \colorbitbox{lightcyan}{16}{Sixteen} & \bitbox{4}{Four} \end{bytefield}– 3isenHeim Apr 11 '16 at 12:27\newcommand{\colorbitbox}[4][]{%with\newcommand{\colorbitbox}[4][lrtb]{%. This way, every colorbitbox has its four sides drawn by default. And forcolorwordboxthe default could belr. – Ignasi Apr 11 '16 at 14:28