From 73b915ed057eab5d8910952f111248d89ce5c9f9 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Thu, 12 Dec 2019 18:29:51 -0500 Subject: Fix formatting of RGB hex codes --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e2ffeea1..05e30bfe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -97,7 +97,7 @@ fn color_to_hex(color: Color) -> String { font_style: FontStyle::empty(), }; paint::paint_text( - &format!("#{:x?}{:x?}{:x?}", color.r, color.g, color.b), + &format!("#{:02x?}{:02x?}{:02x?}", color.r, color.g, color.b), style, &mut string, ) -- cgit v1.2.3