From 3b0600e64a9725e349ad48d9567c75577b2a3ca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Sun, 9 Mar 2025 10:19:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DSwatch=E4=B8=AD=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F=E7=9A=84=E4=BF=9D=E6=8C=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- color-module/src/schemes/swatch_style/swatch.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/color-module/src/schemes/swatch_style/swatch.rs b/color-module/src/schemes/swatch_style/swatch.rs index 8f02bb9..4d5a20f 100644 --- a/color-module/src/schemes/swatch_style/swatch.rs +++ b/color-module/src/schemes/swatch_style/swatch.rs @@ -1,5 +1,4 @@ -use std::collections::HashMap; - +use linked_hash_map::LinkedHashMap; use palette::Oklch; use crate::convert::map_oklch_to_srgb_hex; @@ -96,8 +95,8 @@ impl Swatch { variables } - pub fn to_css_auto_scheme_collection(&self, name: &str) -> HashMap { - let mut collection = HashMap::new(); + pub fn to_css_auto_scheme_collection(&self, name: &str) -> LinkedHashMap { + let mut collection = LinkedHashMap::new(); for (i, color) in self.swatch().iter().enumerate() { collection.insert( format!("{}-{}", name, i * 100),