fix color pretty printer to show alpha at the right time
This commit is contained in:
parent
827c5eb0a6
commit
781b822597
|
@ -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 }
|
||||
|
|
Loading…
Reference in New Issue