Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to use with pdfmanagement-testphase #1

Closed
dbitouze opened this issue Jul 1, 2021 · 11 comments
Closed

Impossible to use with pdfmanagement-testphase #1

dbitouze opened this issue Jul 1, 2021 · 11 comments
Labels
upstream Not a bug of this package

Comments

@dbitouze
Copy link

dbitouze commented Jul 1, 2021

As shown by the following MCE:

\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{}
\documentclass{article}
\usepackage{ninecolors}
\begin{document}
\end{document}

ninecolors is currently incompatible with pdfmanagement-testphase because of:

! LaTeX3 Error: Unknown color model 'rgb:Hsb'.

A way to fix this is to replace rgb:Hsb by Hsb in the code of ninecolors. Is this rgb: necessary?

@lvjr
Copy link
Owner

lvjr commented Jul 1, 2021

Yes, it's necessary when you need to use pgf or beamer in you documents. Please submit a bug in l3color instead.

@lvjr lvjr added the upstream Not a bug of this package label Jul 1, 2021
@lvjr lvjr closed this as completed Jul 2, 2021
@dbitouze
Copy link
Author

dbitouze commented Jul 2, 2021

Yes, it's necessary when you need to use pgf or beamer in you documents. Please submit a bug in l3color instead.

In order to let me provide a detailed bug report, could you elaborate? Because the following, where ninecolors-without-rgb.sty is a clone of your ninecolors.sty where the rgb:s have been removed, compile like a charm (BTW, shouldn't it be \ProvidesPackage instead of \ProvidesClass?):

\begin{filecontents*}[overwrite]{ninecolors-without-rgb.sty}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ninecolors-without-rgb}[2021/05/24 v2021C Select colors with proper color contrast]
\RequirePackage{xcolor}
\RequirePackage{xparse}

\ExplSyntaxOn

\tl_new:N \l__ninecolors_sat_tl

\keys_define:nn {ninecolors}
  {
    saturation .tl_set:N = \l__ninecolors_sat_tl,
    saturation .initial:n = medium,
  }

\NewDocumentCommand \NineColors {m}
  {
    \keys_set:nn {ninecolors} {#1}
    \cs:w ninecolors@define@color@ \l__ninecolors_sat_tl \cs_end:
  }

\@namedef{ninecolors@define@mono}{%
  \definecolor{gray1}{gray}{0.14}
  \definecolor{gray2}{gray}{0.23}
  \definecolor{gray3}{gray}{0.30}
  \definecolor{gray4}{gray}{0.38}
  \definecolor{gray5}{gray}{0.46}
  \definecolor{gray6}{gray}{0.55}
  \definecolor{gray7}{gray}{0.64}
  \definecolor{gray8}{gray}{0.75}
  \definecolor{gray9}{gray}{0.87}
}

\@namedef{ninecolors@define@color@low}{%
  \definecolor{red1}{Hsb}{0,0.67,0.26}
  \definecolor{red2}{Hsb}{0,0.67,0.41}
  \definecolor{red3}{Hsb}{0,0.67,0.54}
  \definecolor{red4}{Hsb}{0,0.67,0.67}
  \definecolor{red5}{Hsb}{0,0.60,0.77}
  \definecolor{red6}{Hsb}{0,0.46,0.81}
  \definecolor{red7}{Hsb}{0,0.34,0.86}
  \definecolor{red8}{Hsb}{0,0.22,0.90}
  \definecolor{red9}{Hsb}{0,0.11,0.95}
  \definecolor{brown1}{Hsb}{30,0.67,0.19}
  \definecolor{brown2}{Hsb}{30,0.67,0.31}
  \definecolor{brown3}{Hsb}{30,0.67,0.41}
  \definecolor{brown4}{Hsb}{30,0.67,0.51}
  \definecolor{brown5}{Hsb}{30,0.67,0.62}
  \definecolor{brown6}{Hsb}{30,0.67,0.74}
  \definecolor{brown7}{Hsb}{30,0.49,0.80}
  \definecolor{brown8}{Hsb}{30,0.32,0.86}
  \definecolor{brown9}{Hsb}{30,0.15,0.93}
  \definecolor{yellow1}{Hsb}{60,0.67,0.15}
  \definecolor{yellow2}{Hsb}{60,0.67,0.23}
  \definecolor{yellow3}{Hsb}{60,0.67,0.31}
  \definecolor{yellow4}{Hsb}{60,0.67,0.39}
  \definecolor{yellow5}{Hsb}{60,0.67,0.47}
  \definecolor{yellow6}{Hsb}{60,0.67,0.56}
  \definecolor{yellow7}{Hsb}{60,0.67,0.66}
  \definecolor{yellow8}{Hsb}{60,0.59,0.77}
  \definecolor{yellow9}{Hsb}{60,0.27,0.88}
  \definecolor{olive1}{Hsb}{90,0.67,0.16}
  \definecolor{olive2}{Hsb}{90,0.67,0.25}
  \definecolor{olive3}{Hsb}{90,0.67,0.33}
  \definecolor{olive4}{Hsb}{90,0.67,0.42}
  \definecolor{olive5}{Hsb}{90,0.67,0.51}
  \definecolor{olive6}{Hsb}{90,0.67,0.60}
  \definecolor{olive7}{Hsb}{90,0.67,0.71}
  \definecolor{olive8}{Hsb}{90,0.48,0.81}
  \definecolor{olive9}{Hsb}{90,0.22,0.90}
  \definecolor{green1}{Hsb}{120,0.67,0.16}
  \definecolor{green2}{Hsb}{120,0.67,0.26}
  \definecolor{green3}{Hsb}{120,0.67,0.35}
  \definecolor{green4}{Hsb}{120,0.67,0.44}
  \definecolor{green5}{Hsb}{120,0.67,0.53}
  \definecolor{green6}{Hsb}{120,0.67,0.63}
  \definecolor{green7}{Hsb}{120,0.67,0.74}
  \definecolor{green8}{Hsb}{120,0.42,0.83}
  \definecolor{green9}{Hsb}{120,0.19,0.91}
  \definecolor{teal1}{Hsb}{150,0.67,0.16}
  \definecolor{teal2}{Hsb}{150,0.67,0.26}
  \definecolor{teal3}{Hsb}{150,0.67,0.34}
  \definecolor{teal4}{Hsb}{150,0.67,0.43}
  \definecolor{teal5}{Hsb}{150,0.67,0.52}
  \definecolor{teal6}{Hsb}{150,0.67,0.62}
  \definecolor{teal7}{Hsb}{150,0.67,0.73}
  \definecolor{teal8}{Hsb}{150,0.44,0.82}
  \definecolor{teal9}{Hsb}{150,0.20,0.91}
  \definecolor{cyan1}{Hsb}{180,0.67,0.16}
  \definecolor{cyan2}{Hsb}{180,0.67,0.25}
  \definecolor{cyan3}{Hsb}{180,0.67,0.33}
  \definecolor{cyan4}{Hsb}{180,0.67,0.42}
  \definecolor{cyan5}{Hsb}{180,0.67,0.51}
  \definecolor{cyan6}{Hsb}{180,0.67,0.60}
  \definecolor{cyan7}{Hsb}{180,0.67,0.71}
  \definecolor{cyan8}{Hsb}{180,0.47,0.81}
  \definecolor{cyan9}{Hsb}{180,0.21,0.90}
  \definecolor{azure1}{Hsb}{210,0.67,0.22}
  \definecolor{azure2}{Hsb}{210,0.67,0.35}
  \definecolor{azure3}{Hsb}{210,0.67,0.47}
  \definecolor{azure4}{Hsb}{210,0.67,0.59}
  \definecolor{azure5}{Hsb}{210,0.67,0.71}
  \definecolor{azure6}{Hsb}{210,0.56,0.78}
  \definecolor{azure7}{Hsb}{210,0.41,0.83}
  \definecolor{azure8}{Hsb}{210,0.27,0.88}
  \definecolor{azure9}{Hsb}{210,0.13,0.94}
  \definecolor{blue1}{Hsb}{240,0.67,0.34}
  \definecolor{blue2}{Hsb}{240,0.67,0.53}
  \definecolor{blue3}{Hsb}{240,0.67,0.70}
  \definecolor{blue4}{Hsb}{240,0.58,0.77}
  \definecolor{blue5}{Hsb}{240,0.48,0.81}
  \definecolor{blue6}{Hsb}{240,0.39,0.84}
  \definecolor{blue7}{Hsb}{240,0.29,0.87}
  \definecolor{blue8}{Hsb}{240,0.19,0.91}
  \definecolor{blue9}{Hsb}{240,0.10,0.95}
  \definecolor{violet1}{Hsb}{270,0.67,0.29}
  \definecolor{violet2}{Hsb}{270,0.67,0.45}
  \definecolor{violet3}{Hsb}{270,0.67,0.60}
  \definecolor{violet4}{Hsb}{270,0.67,0.75}
  \definecolor{violet5}{Hsb}{270,0.54,0.79}
  \definecolor{violet6}{Hsb}{270,0.43,0.82}
  \definecolor{violet7}{Hsb}{270,0.32,0.86}
  \definecolor{violet8}{Hsb}{270,0.21,0.90}
  \definecolor{violet9}{Hsb}{270,0.11,0.95}
  \definecolor{magenta1}{Hsb}{300,0.67,0.23}
  \definecolor{magenta2}{Hsb}{300,0.67,0.37}
  \definecolor{magenta3}{Hsb}{300,0.67,0.49}
  \definecolor{magenta4}{Hsb}{300,0.67,0.61}
  \definecolor{magenta5}{Hsb}{300,0.67,0.74}
  \definecolor{magenta6}{Hsb}{300,0.51,0.80}
  \definecolor{magenta7}{Hsb}{300,0.37,0.84}
  \definecolor{magenta8}{Hsb}{300,0.24,0.89}
  \definecolor{magenta9}{Hsb}{300,0.12,0.94}
  \definecolor{purple1}{Hsb}{330,0.67,0.25}
  \definecolor{purple2}{Hsb}{330,0.67,0.39}
  \definecolor{purple3}{Hsb}{330,0.67,0.52}
  \definecolor{purple4}{Hsb}{330,0.67,0.65}
  \definecolor{purple5}{Hsb}{330,0.63,0.76}
  \definecolor{purple6}{Hsb}{330,0.48,0.81}
  \definecolor{purple7}{Hsb}{330,0.35,0.85}
  \definecolor{purple8}{Hsb}{330,0.23,0.90}
  \definecolor{purple9}{Hsb}{330,0.11,0.95}
}

\@namedef{ninecolors@define@color@medium}{%
  \definecolor{red1}{Hsb}{0,0.79,0.28}
  \definecolor{red2}{Hsb}{0,0.79,0.44}
  \definecolor{red3}{Hsb}{0,0.79,0.58}
  \definecolor{red4}{Hsb}{0,0.79,0.72}
  \definecolor{red5}{Hsb}{0,0.72,0.84}
  \definecolor{red6}{Hsb}{0,0.54,0.87}
  \definecolor{red7}{Hsb}{0,0.40,0.90}
  \definecolor{red8}{Hsb}{0,0.26,0.93}
  \definecolor{red9}{Hsb}{0,0.13,0.97}
  \definecolor{brown1}{Hsb}{30,0.79,0.21}
  \definecolor{brown2}{Hsb}{30,0.79,0.33}
  \definecolor{brown3}{Hsb}{30,0.79,0.43}
  \definecolor{brown4}{Hsb}{30,0.79,0.54}
  \definecolor{brown5}{Hsb}{30,0.79,0.66}
  \definecolor{brown6}{Hsb}{30,0.79,0.78}
  \definecolor{brown7}{Hsb}{30,0.63,0.86}
  \definecolor{brown8}{Hsb}{30,0.41,0.90}
  \definecolor{brown9}{Hsb}{30,0.20,0.95}
  \definecolor{yellow1}{Hsb}{60,0.79,0.15}
  \definecolor{yellow2}{Hsb}{60,0.79,0.23}
  \definecolor{yellow3}{Hsb}{60,0.79,0.31}
  \definecolor{yellow4}{Hsb}{60,0.79,0.39}
  \definecolor{yellow5}{Hsb}{60,0.79,0.48}
  \definecolor{yellow6}{Hsb}{60,0.79,0.57}
  \definecolor{yellow7}{Hsb}{60,0.79,0.66}
  \definecolor{yellow8}{Hsb}{60,0.79,0.77}
  \definecolor{yellow9}{Hsb}{60,0.46,0.89}
  \definecolor{olive1}{Hsb}{90,0.79,0.16}
  \definecolor{olive2}{Hsb}{90,0.79,0.25}
  \definecolor{olive3}{Hsb}{90,0.79,0.34}
  \definecolor{olive4}{Hsb}{90,0.79,0.42}
  \definecolor{olive5}{Hsb}{90,0.79,0.51}
  \definecolor{olive6}{Hsb}{90,0.79,0.61}
  \definecolor{olive7}{Hsb}{90,0.79,0.72}
  \definecolor{olive8}{Hsb}{90,0.76,0.83}
  \definecolor{olive9}{Hsb}{90,0.34,0.92}
  \definecolor{green1}{Hsb}{120,0.79,0.17}
  \definecolor{green2}{Hsb}{120,0.79,0.26}
  \definecolor{green3}{Hsb}{120,0.79,0.35}
  \definecolor{green4}{Hsb}{120,0.79,0.44}
  \definecolor{green5}{Hsb}{120,0.79,0.53}
  \definecolor{green6}{Hsb}{120,0.79,0.63}
  \definecolor{green7}{Hsb}{120,0.79,0.74}
  \definecolor{green8}{Hsb}{120,0.64,0.85}
  \definecolor{green9}{Hsb}{120,0.28,0.93}
  \definecolor{teal1}{Hsb}{150,0.79,0.16}
  \definecolor{teal2}{Hsb}{150,0.79,0.26}
  \definecolor{teal3}{Hsb}{150,0.79,0.35}
  \definecolor{teal4}{Hsb}{150,0.79,0.43}
  \definecolor{teal5}{Hsb}{150,0.79,0.53}
  \definecolor{teal6}{Hsb}{150,0.79,0.62}
  \definecolor{teal7}{Hsb}{150,0.79,0.73}
  \definecolor{teal8}{Hsb}{150,0.68,0.85}
  \definecolor{teal9}{Hsb}{150,0.30,0.93}
  \definecolor{cyan1}{Hsb}{180,0.79,0.16}
  \definecolor{cyan2}{Hsb}{180,0.79,0.25}
  \definecolor{cyan3}{Hsb}{180,0.79,0.34}
  \definecolor{cyan4}{Hsb}{180,0.79,0.42}
  \definecolor{cyan5}{Hsb}{180,0.79,0.51}
  \definecolor{cyan6}{Hsb}{180,0.79,0.61}
  \definecolor{cyan7}{Hsb}{180,0.79,0.71}
  \definecolor{cyan8}{Hsb}{180,0.77,0.83}
  \definecolor{cyan9}{Hsb}{180,0.32,0.92}
  \definecolor{azure1}{Hsb}{210,0.79,0.24}
  \definecolor{azure2}{Hsb}{210,0.79,0.38}
  \definecolor{azure3}{Hsb}{210,0.79,0.51}
  \definecolor{azure4}{Hsb}{210,0.79,0.64}
  \definecolor{azure5}{Hsb}{210,0.79,0.77}
  \definecolor{azure6}{Hsb}{210,0.67,0.85}
  \definecolor{azure7}{Hsb}{210,0.50,0.88}
  \definecolor{azure8}{Hsb}{210,0.33,0.92}
  \definecolor{azure9}{Hsb}{210,0.17,0.96}
  \definecolor{blue1}{Hsb}{240,0.79,0.41}
  \definecolor{blue2}{Hsb}{240,0.79,0.64}
  \definecolor{blue3}{Hsb}{240,0.77,0.83}
  \definecolor{blue4}{Hsb}{240,0.65,0.85}
  \definecolor{blue5}{Hsb}{240,0.54,0.87}
  \definecolor{blue6}{Hsb}{240,0.43,0.90}
  \definecolor{blue7}{Hsb}{240,0.33,0.92}
  \definecolor{blue8}{Hsb}{240,0.22,0.94}
  \definecolor{blue9}{Hsb}{240,0.11,0.97}
  \definecolor{violet1}{Hsb}{270,0.79,0.33}
  \definecolor{violet2}{Hsb}{270,0.79,0.52}
  \definecolor{violet3}{Hsb}{270,0.79,0.69}
  \definecolor{violet4}{Hsb}{270,0.76,0.83}
  \definecolor{violet5}{Hsb}{270,0.62,0.86}
  \definecolor{violet6}{Hsb}{270,0.49,0.88}
  \definecolor{violet7}{Hsb}{270,0.37,0.91}
  \definecolor{violet8}{Hsb}{270,0.25,0.94}
  \definecolor{violet9}{Hsb}{270,0.13,0.97}
  \definecolor{magenta1}{Hsb}{300,0.79,0.25}
  \definecolor{magenta2}{Hsb}{300,0.79,0.39}
  \definecolor{magenta3}{Hsb}{300,0.79,0.52}
  \definecolor{magenta4}{Hsb}{300,0.79,0.65}
  \definecolor{magenta5}{Hsb}{300,0.79,0.78}
  \definecolor{magenta6}{Hsb}{300,0.62,0.86}
  \definecolor{magenta7}{Hsb}{300,0.44,0.89}
  \definecolor{magenta8}{Hsb}{300,0.29,0.93}
  \definecolor{magenta9}{Hsb}{300,0.14,0.96}
  \definecolor{purple1}{Hsb}{330,0.79,0.27}
  \definecolor{purple2}{Hsb}{330,0.79,0.42}
  \definecolor{purple3}{Hsb}{330,0.79,0.56}
  \definecolor{purple4}{Hsb}{330,0.79,0.70}
  \definecolor{purple5}{Hsb}{330,0.76,0.83}
  \definecolor{purple6}{Hsb}{330,0.57,0.87}
  \definecolor{purple7}{Hsb}{330,0.42,0.90}
  \definecolor{purple8}{Hsb}{330,0.27,0.93}
  \definecolor{purple9}{Hsb}{330,0.14,0.96}
}

\@namedef{ninecolors@define@color@high}{%
  \definecolor{red1}{Hsb}{0,0.89,0.30}
  \definecolor{red2}{Hsb}{0,0.89,0.46}
  \definecolor{red3}{Hsb}{0,0.89,0.61}
  \definecolor{red4}{Hsb}{0,0.89,0.76}
  \definecolor{red5}{Hsb}{0,0.87,0.90}
  \definecolor{red6}{Hsb}{0,0.62,0.93}
  \definecolor{red7}{Hsb}{0,0.45,0.95}
  \definecolor{red8}{Hsb}{0,0.30,0.96}
  \definecolor{red9}{Hsb}{0,0.15,0.98}
  \definecolor{brown1}{Hsb}{30,0.89,0.22}
  \definecolor{brown2}{Hsb}{30,0.89,0.34}
  \definecolor{brown3}{Hsb}{30,0.89,0.46}
  \definecolor{brown4}{Hsb}{30,0.89,0.57}
  \definecolor{brown5}{Hsb}{30,0.89,0.69}
  \definecolor{brown6}{Hsb}{30,0.89,0.82}
  \definecolor{brown7}{Hsb}{30,0.77,0.91}
  \definecolor{brown8}{Hsb}{30,0.51,0.94}
  \definecolor{brown9}{Hsb}{30,0.25,0.97}
  \definecolor{yellow1}{Hsb}{60,0.89,0.15}
  \definecolor{yellow2}{Hsb}{60,0.89,0.23}
  \definecolor{yellow3}{Hsb}{60,0.89,0.31}
  \definecolor{yellow4}{Hsb}{60,0.89,0.39}
  \definecolor{yellow5}{Hsb}{60,0.89,0.48}
  \definecolor{yellow6}{Hsb}{60,0.89,0.57}
  \definecolor{yellow7}{Hsb}{60,0.89,0.66}
  \definecolor{yellow8}{Hsb}{60,0.89,0.77}
  \definecolor{yellow9}{Hsb}{60,0.89,0.90}
  \definecolor{olive1}{Hsb}{90,0.89,0.16}
  \definecolor{olive2}{Hsb}{90,0.89,0.26}
  \definecolor{olive3}{Hsb}{90,0.89,0.34}
  \definecolor{olive4}{Hsb}{90,0.89,0.43}
  \definecolor{olive5}{Hsb}{90,0.89,0.52}
  \definecolor{olive6}{Hsb}{90,0.89,0.61}
  \definecolor{olive7}{Hsb}{90,0.89,0.72}
  \definecolor{olive8}{Hsb}{90,0.89,0.84}
  \definecolor{olive9}{Hsb}{90,0.52,0.94}
  \definecolor{green1}{Hsb}{120,0.89,0.17}
  \definecolor{green2}{Hsb}{120,0.89,0.27}
  \definecolor{green3}{Hsb}{120,0.89,0.35}
  \definecolor{green4}{Hsb}{120,0.89,0.44}
  \definecolor{green5}{Hsb}{120,0.89,0.54}
  \definecolor{green6}{Hsb}{120,0.89,0.64}
  \definecolor{green7}{Hsb}{120,0.89,0.75}
  \definecolor{green8}{Hsb}{120,0.89,0.87}
  \definecolor{green9}{Hsb}{120,0.39,0.95}
  \definecolor{teal1}{Hsb}{150,0.89,0.17}
  \definecolor{teal2}{Hsb}{150,0.89,0.26}
  \definecolor{teal3}{Hsb}{150,0.89,0.35}
  \definecolor{teal4}{Hsb}{150,0.89,0.44}
  \definecolor{teal5}{Hsb}{150,0.89,0.53}
  \definecolor{teal6}{Hsb}{150,0.89,0.63}
  \definecolor{teal7}{Hsb}{150,0.89,0.74}
  \definecolor{teal8}{Hsb}{150,0.89,0.86}
  \definecolor{teal9}{Hsb}{150,0.43,0.95}
  \definecolor{cyan1}{Hsb}{180,0.89,0.16}
  \definecolor{cyan2}{Hsb}{180,0.89,0.25}
  \definecolor{cyan3}{Hsb}{180,0.89,0.34}
  \definecolor{cyan4}{Hsb}{180,0.89,0.42}
  \definecolor{cyan5}{Hsb}{180,0.89,0.51}
  \definecolor{cyan6}{Hsb}{180,0.89,0.61}
  \definecolor{cyan7}{Hsb}{180,0.89,0.71}
  \definecolor{cyan8}{Hsb}{180,0.89,0.83}
  \definecolor{cyan9}{Hsb}{180,0.50,0.94}
  \definecolor{azure1}{Hsb}{210,0.89,0.26}
  \definecolor{azure2}{Hsb}{210,0.89,0.41}
  \definecolor{azure3}{Hsb}{210,0.89,0.55}
  \definecolor{azure4}{Hsb}{210,0.89,0.69}
  \definecolor{azure5}{Hsb}{210,0.89,0.83}
  \definecolor{azure6}{Hsb}{210,0.77,0.91}
  \definecolor{azure7}{Hsb}{210,0.58,0.93}
  \definecolor{azure8}{Hsb}{210,0.39,0.95}
  \definecolor{azure9}{Hsb}{210,0.20,0.98}
  \definecolor{blue1}{Hsb}{240,0.89,0.48}
  \definecolor{blue2}{Hsb}{240,0.89,0.73}
  \definecolor{blue3}{Hsb}{240,0.84,0.90}
  \definecolor{blue4}{Hsb}{240,0.70,0.92}
  \definecolor{blue5}{Hsb}{240,0.58,0.93}
  \definecolor{blue6}{Hsb}{240,0.47,0.94}
  \definecolor{blue7}{Hsb}{240,0.36,0.96}
  \definecolor{blue8}{Hsb}{240,0.25,0.97}
  \definecolor{blue9}{Hsb}{240,0.13,0.98}
  \definecolor{violet1}{Hsb}{270,0.89,0.37}
  \definecolor{violet2}{Hsb}{270,0.89,0.57}
  \definecolor{violet3}{Hsb}{270,0.89,0.75}
  \definecolor{violet4}{Hsb}{270,0.85,0.90}
  \definecolor{violet5}{Hsb}{270,0.68,0.92}
  \definecolor{violet6}{Hsb}{270,0.54,0.94}
  \definecolor{violet7}{Hsb}{270,0.41,0.95}
  \definecolor{violet8}{Hsb}{270,0.28,0.97}
  \definecolor{violet9}{Hsb}{270,0.14,0.98}
  \definecolor{magenta1}{Hsb}{300,0.89,0.26}
  \definecolor{magenta2}{Hsb}{300,0.89,0.41}
  \definecolor{magenta3}{Hsb}{300,0.89,0.54}
  \definecolor{magenta4}{Hsb}{300,0.89,0.67}
  \definecolor{magenta5}{Hsb}{300,0.89,0.80}
  \definecolor{magenta6}{Hsb}{300,0.76,0.91}
  \definecolor{magenta7}{Hsb}{300,0.52,0.94}
  \definecolor{magenta8}{Hsb}{300,0.33,0.96}
  \definecolor{magenta9}{Hsb}{300,0.17,0.98}
  \definecolor{purple1}{Hsb}{330,0.89,0.29}
  \definecolor{purple2}{Hsb}{330,0.89,0.45}
  \definecolor{purple3}{Hsb}{330,0.89,0.59}
  \definecolor{purple4}{Hsb}{330,0.89,0.73}
  \definecolor{purple5}{Hsb}{330,0.89,0.88}
  \definecolor{purple6}{Hsb}{330,0.66,0.92}
  \definecolor{purple7}{Hsb}{330,0.47,0.94}
  \definecolor{purple8}{Hsb}{330,0.31,0.96}
  \definecolor{purple9}{Hsb}{330,0.16,0.98}
}

\@nameuse{ninecolors@define@mono}
\@nameuse{ninecolors@define@color@medium}

\ExplSyntaxOff

\end{filecontents*}

\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{}
\documentclass{beamer}
\usepackage{ninecolors-without-rgb}
\usepackage{tikz}
\begin{document}
\begin{frame}
\begin{tikzpicture}
\fill[green] (0,0) rectangle (1,1);
\shade[left color=green, right color=magenta] (1.25,0) rectangle (3.75,1);
\fill[magenta] (4,0) rectangle (5,1);
\end{tikzpicture}
\end{frame}
\end{document}

@lvjr
Copy link
Owner

lvjr commented Jul 2, 2021

It seems like a catcode problem with l3color or pdfmanagement: removing \ExplSyntaxOn and \ExplSyntaxOff from the following code solves this problem.

\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{}
\documentclass{article}
\usepackage{xcolor}
\usepackage{tikz}
\ExplSyntaxOn
\definecolor{blue3}{rgb:Hsb}{240,0.67,0.70}
\ExplSyntaxOff
\begin{document}
\begin{tikzpicture}
\path[fill=blue3] (0,0) rectangle (1,1);
\end{tikzpicture}
\end{document}

@dbitouze
Copy link
Author

dbitouze commented Jul 2, 2021

Indeed, but could you elaborate the need of this rgb:Hsb syntax. I could find it in the xcolor's documentation.

@dbitouze
Copy link
Author

dbitouze commented Jul 2, 2021

Anyway, it should be enough for ninecolors.sty to move \ExplSyntaxOff from

\ExplSyntaxOff
to

@lvjr
Copy link
Owner

lvjr commented Jul 2, 2021

Alreadly in the above code. If you remove rgb:, tikz package would complain "unsupported color model 'hsb'". The rgb: prefix tells xcolor to convert color from hsb to rgb in defining it.

@dbitouze
Copy link
Author

dbitouze commented Jul 2, 2021

Alreadly in the above code.

I don't see what you mean: \ExplSyntaxOff still is after all the \definecolor{⋯}{rgb:Hsb}{⋯}. Would it be before those definitions (e.g. at line 29), the issue would be fixed.

If you remove rgb:, tikz package would complain "unsupported color model 'hsb'". The rgb: prefix tells xcolor to convert color from hsb to rgb in defining it.

OK, thanks.

@lvjr
Copy link
Owner

lvjr commented Jul 3, 2021

But it is not the bug of ninecolors package. I think I need not to fix it.

@dbitouze
Copy link
Author

dbitouze commented Jul 3, 2021

But it is not the bug of ninecolors package. I think I need not to fix it.

Maybe that's not a bug per se, but having those colons in rgb:Hsb between \ExplSyntaxOn and \ExplSyntaxOff leads to errors, whereas not doing that is harmless for ninecolors.

@lvjr
Copy link
Owner

lvjr commented Jul 4, 2021

OK, I will "fix" it later. And maybe you can also submit the bug to l3color or pdfmanagement.

@lvjr
Copy link
Owner

lvjr commented Feb 10, 2022

@dbitouze Now this bug has been totally fixed by the above commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Not a bug of this package
Projects
None yet
Development

No branches or pull requests

2 participants