[tex4ht] [bug #623] Images inverted with dark mode by default html5 css

2024-04-09 Thread Michal Hoftich
Follow-up Comment #3, bug #623 (project tex4ht):

Dear Oliver, 

thanks for the confirmation. It was really an omission on my side that I added
color inversion, but didn't set the basic colors. I probably forgot to import
it from the test file I used at the time. I will add it now.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #623] Images inverted with dark mode by default html5 css

2024-04-09 Thread Oliver Freyermuth
Follow-up Comment #2, bug #623 (project tex4ht):

Dear Michal,

aaah, I see. In fact, my problems were seen with TikZpictures, i.e. I'm the
same guy from here:
https://tex.stackexchange.com/a/641354/224985

The black pgfornaments became invisible with a dark theme for me by default,
which confused me at first. I then tried with a colourful TikZ picture and saw
the colours became inverted, i.e. I used:

\tikzset{pgfornamentstyle/.style={color=black,fill=yellow, opacity=0.7,
line width=0.5pt}};
\node[anchor=south]{\pgfornament[height=1.0cm]{87}};

within that example and the ornaments came up with a blue fill colour. But you
are fully correct, it does not happen to \includegraphics. 

The CSS config you added works perfectly fine for me in the case of black TikZ
images, it makes them visible nicely and the body and text are well adapted to
the dark theme. So I think this is a large improvement to the default :-). 

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] [bug #623] Images inverted with dark mode by default html5 css

2024-04-09 Thread Michal Hoftich
Follow-up Comment #1, bug #623 (project tex4ht):

Dear Olivier,

Yes, I've added this rule because I've found that images created from math or
TikZ images with transparent backgrounds were completely black. They always
have a filename that starts with the \jobname, so src^="\jobname" should match
only these images, as opposed to pictures included by \includegraphics, which
generally aren't named the same as the main document. So, it is really strange
that the images you included are inverted. This rule shouldn't apply to them.

But as you wrote that you have a white background, I realized we don't set a
dark background in the dark mode. We should fix that. Does the following
config file work for you?

\Preamble{xhtml}
\Css{
body {
  background-color: Canvas;
  color: CanvasText;
  color-scheme: light dark;
}
}
\begin{document}
\EndPreamble




___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/