Skip to content

Build your personal knowledge base with Trilium Notes

client/adaptive colors: adapt the colors for printing as well

Adorian Dorand9709af05ddd
diff --git a/apps/client/src/print.css b/apps/client/src/print.css
index 96b7dfeaa4..1a69e1f377 100644
--- a/apps/client/src/print.css
+++ b/apps/client/src/print.css
@@ -1,4 +1,6 @@
@import "./stylesheets/boxicons-compat.css";
+/* No dark theme class is set when printing, so colors get the light theme's shades. */
+@import "./stylesheets/adaptive-colors.css";
:root {
--print-font-size: 11pt;
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Notes/Printing & Exporting as PDF.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Notes/Printing & Exporting as PDF.html
index 7684ebc597..ab73e33a6b 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Notes/Printing & Exporting as PDF.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Notes/Printing & Exporting as PDF.html
@@ -129,6 +129,9 @@
supported when printing, in which case the <em>Print</em> and <em>Export as PDF</em> options
will be disabled.</p>
<ul>
+ <li>For&nbsp;<a class="reference-link" href="#root/_help_iPIMuisry3hd">Text</a>&nbsp;notes,
+ font, background and table colors are printed in the shades of light themes,
+ whatever the current theme (see&nbsp;<a class="reference-link" href="#root/_help_Gr6xFaF6ioJ5">General formatting</a>).</li>
<li>For&nbsp;<a class="reference-link" href="#root/_help_6f9hih2hXXZk">Code</a>&nbsp;notes:
<ul>
<li>Line numbers are not printed.</li>
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/General formatting.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/General formatting.html
index 01bb16730e..cdf2ae3c58 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/General formatting.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Text/General formatting.html
@@ -77,8 +77,9 @@
so the text stays readable after switching between light and dark themes.
The hue stays the same: red text is red in both themes, only lighter or
darker. This applies to the palette, the color picker and the document
- colors alike, and to shared notes too. The note itself keeps the color
- as it was picked, so an exported note shows it unchanged.</p>
+ colors alike, and to shared notes too. Printed notes and PDF exports always
+ use the shades of light themes, which suit white paper. The note itself
+ keeps the color as it was picked, so an exported note shows it unchanged.</p>
<p>Colors applied with older versions of Trilium are shown exactly as they
were picked, until the note is next edited.</p>
<p>Older browsers that can't adapt colors show them exactly as they were
diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Printing & Exporting as PDF.md b/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Printing & Exporting as PDF.md
index cda7e0398d..795852224e 100644
--- a/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Printing & Exporting as PDF.md
+++ b/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Printing & Exporting as PDF.md
@@ -95,6 +95,7 @@ It's possible to trigger both printing and export as PDF from the keyboard by go
Not all <a class="reference-link" href="../../Note%20Types.md">Note Types</a> are supported when printing, in which case the _Print_ and _Export as PDF_ options will be disabled.
+* For <a class="reference-link" href="../../Note%20Types/Text.md">Text</a> notes, font, background and table colors are printed in the shades of light themes, whatever the current theme (see <a class="reference-link" href="../../Note%20Types/Text/General%20formatting.md">General formatting</a>).
* For <a class="reference-link" href="../../Note%20Types/Code.md">Code</a> notes:
* Line numbers are not printed.
* Syntax highlighting is enabled, however a default theme (Visual Studio) is enforced.
diff --git a/docs/User Guide/User Guide/Note Types/Text/General formatting.md b/docs/User Guide/User Guide/Note Types/Text/General formatting.md
index 62a61feef1..f620ff40fc 100644
--- a/docs/User Guide/User Guide/Note Types/Text/General formatting.md
+++ b/docs/User Guide/User Guide/Note Types/Text/General formatting.md
@@ -65,7 +65,7 @@ Selected text can be colored with one of the predefined colors from a palette or
Once there is at least one color defined in the document, it will appear in the list for easy reuse.
-Colors adapt to the [theme](../../Basic%20Concepts%20and%20Features/Themes.md). Trilium shows each color in a lighter or darker shade that suits the current theme, so the text stays readable after switching between light and dark themes. The hue stays the same: red text is red in both themes, only lighter or darker. This applies to the palette, the color picker and the document colors alike, and to shared notes too. The note itself keeps the color as it was picked, so an exported note shows it unchanged.
+Colors adapt to the [theme](../../Basic%20Concepts%20and%20Features/Themes.md). Trilium shows each color in a lighter or darker shade that suits the current theme, so the text stays readable after switching between light and dark themes. The hue stays the same: red text is red in both themes, only lighter or darker. This applies to the palette, the color picker and the document colors alike, and to shared notes too. Printed notes and PDF exports always use the shades of light themes, which suit white paper. The note itself keeps the color as it was picked, so an exported note shows it unchanged.
Colors applied with older versions of Trilium are shown exactly as they were picked, until the note is next edited.