[latex3-commits] [git/LaTeX3-latex3-latex3] deviceNrgb: Always generate 6 digits in HTML export (ccf9cfc52)

Marcel Fabian Krüger tex at 2krueger.de
Fri Oct 22 08:13:58 CEST 2021


Repository : https://github.com/latex3/latex3
On branch  : deviceNrgb
Link       : https://github.com/latex3/latex3/commit/ccf9cfc52016fa8c19cedf9f2610d1ac69c8d1ae

>---------------------------------------------------------------

commit ccf9cfc52016fa8c19cedf9f2610d1ac69c8d1ae
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Fri Oct 22 08:13:58 2021 +0200

    Always generate 6 digits in HTML export


>---------------------------------------------------------------

ccf9cfc52016fa8c19cedf9f2610d1ac69c8d1ae
 l3kernel/l3color.dtx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/l3kernel/l3color.dtx b/l3kernel/l3color.dtx
index cef2e7bef..c6e05c1e0 100644
--- a/l3kernel/l3color.dtx
+++ b/l3kernel/l3color.dtx
@@ -1664,7 +1664,10 @@
   {
     \fp_compare:nNnTF {#1} = { 0 }
       { 00 }
-      { \int_to_Hex:n { \fp_to_int:n { #1 * 255 } } }
+      {
+        \fp_compare:nNnT { #1 * 255 } < { 16 } { 0 }
+        \int_to_Hex:n { \fp_to_int:n { #1 * 255 } }
+      }
   }
 \cs_new_protected:cpn { @@_export_space-sep-rgb:Nw } #1#2 \s_@@_stop
   { \tl_set:Nn #1 {#2} }





More information about the latex3-commits mailing list.