From 81c091489608939568d02fb1e03f592df148100b Mon Sep 17 00:00:00 2001 From: heiazu <13560201846@163.com> Date: Fri, 12 Apr 2024 17:55:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Drgba=E7=B2=BE=E5=BA=A6?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.rs b/src/utils.rs index aef79ef..1fac090 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -106,7 +106,7 @@ pub fn fix_rgba(input: String) -> String { let r = std::str::from_utf8(&caps["r"]).unwrap(); let g = std::str::from_utf8(&caps["g"]).unwrap(); let b = std::str::from_utf8(&caps["b"]).unwrap(); - let corrected_alpha = format!("0{:.2}", a); + let corrected_alpha = format!("0{:.6}", a); return format!("rgba({}, {}, {}, {})", r, g, b, corrected_alpha) } }