6

When I use the rgb otion of xcolor package and tabularray package I got a lot of errors.

Package xcolor Error: Undefined color model `rgb:Hsb'. 

Is it possible to pass this option to xcolor and use tabularray?

\documentclass{article}
\usepackage[rgb]{xcolor}
\usepackage{tabularray}
\begin{document}
Tabularray
\end{document}
0

2 Answers 2

6

See https://github.com/latex3/xcolor/issues/1

Before the issue of xcolor package is fixed, you can use the following workaround:

\documentclass{article}

\usepackage[rgb]{xcolor}

\selectcolormodel{natural}
\usepackage{ninecolors}
\selectcolormodel{rgb}
\usepackage{tabularray}

\begin{document}

\begin{tblr}{colspec={lcr},rowspec={|Q[cyan7]|Q[azure7]|Q[blue7]|}}
 Alpha   & Beta  & Gamma  \\
 Epsilon & Zeta  & Eta    \\
 Iota    & Kappa & Lambda \\
\end{tblr}

\end{document}

enter image description here

3

A more minimal example showing that tabularray is only marginally involved:

\documentclass{article}
\usepackage[rgb]{xcolor}
\usepackage{ninecolors}

\begin{document}

Tabularray

\end{document}

This fails with the same error message as your example, namely

! Package xcolor Error: Undefined color model `rgb:Hsb'.

Where does ninecolors come from? At some point, tabularray does

\AtBeginDocument{\@ifpackageloaded{xcolor}{\RequirePackage{ninecolors}}{}}

so the problem is in compatibility of ninecolors with options passed to xcolor.

Solution? Remove the option rgb and try to contact the author of ninecolors.

1
  • 3
    hm, I fear it is a xcolor bug. The color definition is a valid syntax but fails with the package option. Commented Sep 8, 2021 at 14:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .