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

Color Mixing Desaturates Result #2407

Closed
Xaldew opened this issue Aug 24, 2024 · 0 comments · Fixed by #2408
Closed

Color Mixing Desaturates Result #2407

Xaldew opened this issue Aug 24, 2024 · 0 comments · Fixed by #2408

Comments

@Xaldew
Copy link

Xaldew commented Aug 24, 2024

There seem to be a bit of a bug when using colorlet or definecolor to mix or lighten the colors used in e.g., colorboxes, e.g., in this example white is mixed with 70% of some other colors:

\documentclass[acmsmall,screen]{acmart}

\definecolor{BaseOmm2Transparent}{HTML}{FA9005}
\definecolor{BaseOmm2Opaque}{HTML}{056FFA}

\definecolor{BaseOmm4Transparent}{HTML}{FF0000}
\definecolor{BaseOmm4Opaque}{HTML}{00FF00}
\definecolor{BaseOmm4UnknownTransparent}{HTML}{EDE945}
\definecolor{BaseOmm4UnknownOpaque}{HTML}{808080}

\colorlet{Omm2Transparent}{white!70!BaseOmm2Transparent}
\colorlet{Omm2Opaque}{white!70!BaseOmm2Opaque}

\colorlet{Omm4Transparent}{white!70!BaseOmm4Transparent}
\colorlet{Omm4Opaque}{white!70!BaseOmm4Opaque}
\colorlet{Omm4UnknownTransparent}{white!70!BaseOmm4UnknownTransparent}
\colorlet{Omm4UnknownOpaque}{white!70!BaseOmm4UnknownOpaque}

\begin{document}
\begin{center}
  \begin{tabular}{ll}
    \colorbox{BaseOmm4Transparent}{\texttt{-1}}        & \texttt{VK\_OPACITY\_MICROMAP\_SPECIAL\_INDEX\_FULLY\_TRANSPARENT\_EXT} \\
    \colorbox{BaseOmm4Opaque}{\texttt{-2}}             & \texttt{VK\_OPACITY\_MICROMAP\_SPECIAL\_INDEX\_FULLY\_OPAQUE\_EXT} \\
    \colorbox{BaseOmm4UnknownTransparent}{\texttt{-3}} & \texttt{VK\_OPACITY\_MICROMAP\_SPECIAL\_INDEX\_FULLY\_UNKNOWN\_TRANSPARENT\_EXT} \\
    \colorbox{BaseOmm4UnknownOpaque}{\texttt{-4}}      & \texttt{VK\_OPACITY\_MICROMAP\_SPECIAL\_INDEX\_FULLY\_UNKNOWN\_OPAQUE\_EXT}
  \end{tabular}
\end{center}

\begin{center}
  \begin{tabular}{ll}
    \colorbox{Omm4Transparent}{\texttt{-1}}        & \texttt{VK\_OPACITY\_MICROMAP\_SPECIAL\_INDEX\_FULLY\_TRANSPARENT\_EXT} \\
    \colorbox{Omm4Opaque}{\texttt{-2}}             & \texttt{VK\_OPACITY\_MICROMAP\_SPECIAL\_INDEX\_FULLY\_OPAQUE\_EXT} \\
    \colorbox{Omm4UnknownTransparent}{\texttt{-3}} & \texttt{VK\_OPACITY\_MICROMAP\_SPECIAL\_INDEX\_FULLY\_UNKNOWN\_TRANSPARENT\_EXT} \\
    \colorbox{Omm4UnknownOpaque}{\texttt{-4}}      & \texttt{VK\_OPACITY\_MICROMAP\_SPECIAL\_INDEX\_FULLY\_UNKNOWN\_OPAQUE\_EXT}
  \end{tabular}
\end{center}
\end{document}

The results however all become desaturated (greyscale):

latexml-colorbug

As a reference, the tex yields a PDF that looks like this:
latexml-colorbug-ref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants