fix color pretty printer to show alpha at the right time

This commit is contained in:
tali 2024-01-19 14:02:06 -05:00
parent 827c5eb0a6
commit 781b822597
1 changed files with 2 additions and 2 deletions

View File

@ -195,10 +195,10 @@ module Color = struct
in
if a < 1.0 then
let rgb = hex (r / a) (g / a) (b / a) in
Format.fprintf ppf "#%06x" rgb
Format.fprintf ppf "#%06x;%.2f" rgb a
else
let rgb = hex r g b in
Format.fprintf ppf "#%06x;%.2f" rgb a
Format.fprintf ppf "#%06x" rgb
let invisible () = { r = 0.0; g = 0.0; b = 0.0; a = 0.0 }
let black ?(a = 1.) () = { r = 0.0; g = 0.0; b = 0.0; a }