默认 rgb 颜色

默认 rgb 颜色

目前我使用橙色作为默认颜色。但我想使用语法定义的默认颜色

{rgb}{0.98,41.0,0.08}

如何调整此代码以便默认值{rgb}{0.98,41.0,0.08}同时仍然能够调用\wvPz[red]\wvPz[rgb][0.98,41.0,0.08]

\documentclass[a4paper,12pt]{book}

\usepackage{xcolor}

\begin{document}

\ExplSyntaxOn

\NewDocumentEnvironment{wvPz}{O{orange}ommo}
    {
      \medskip
      \noindent #3 \ #4
      \IfNoValueTF {#5}
          { \hspace{0.5cm} }
        { \ (#5) \par\smallskip }

      \IfNoValueTF{#2}
        { \color{#1} }
        { \color[#1]{#2} }
    }
  {
    \par\medskip
  }

  \ExplSyntaxOff

  \begin{document}

  \begin{wvPz}{Something}{2.2.1}[Name]
    C is a field. R is a subfield of C.
  \end{wvPz}

  \begin{wvPz}[rgb][0.98,41.0,0.08]{Something}{2.2.1}[Name]
    C is a field. R is a subfield of C.
  \end{wvPz}

  \end{document}

相关内容