去掉调试信息,改进结构体序列化方法。

This commit is contained in:
徐涛
2025-02-07 08:28:50 +08:00
parent 7468e28928
commit 2bc250fc3d
5 changed files with 50 additions and 58 deletions

View File

@@ -37,11 +37,6 @@ fn fit_to_wacg(reference: &Oklch, neutral_swatch: &NeutralSwatch, ratio: f32) ->
if contrast_ratio >= ratio || new_target.l <= 0.0 || new_target.l >= 1.0 {
break;
}
web_sys::console::log_3(
&"fit_to_wacg".into(),
&contrast_ratio.into(),
&new_target.l.into(),
);
new_target = neutral_swatch.get(if new_target.l + factor <= 0.0 {
0.0
} else if new_target.l + factor >= 1.0 {