Is it possible to customize the formatting when using string interpolation with Lean4?
More precise: I want to format using hexadecimal digits and add zeros as padding.
Minimal example (Same example in Lean 4 Web):
structure Color where
r : UInt8
g : UInt8
b : UInt8
def Color.to_hex : Color → String
| {r, g, b} => s!"#{r}{g}{b}"
def color : Color := ⟨ 0, 7, 255 ⟩
#eval color.to_hex
#guard color.to_hex = "#07255" -- *NOT* what I want
-- #guard color.to_hex = "#0007ff" -- What I want
Coming from other languages like Rust I would have expected to use some sort separator like : and add formatting information on the right side of that.
But that does not work (the colon has already a different meaning in Lean 4) and neither the documentation nor the reference give more information.