修正区间包含。
This commit is contained in:
parent
025d92e552
commit
d0f9b2af14
|
@ -283,13 +283,13 @@ pub fn series(
|
|||
let oklch = Oklch::from_color(origin_color.clone());
|
||||
|
||||
let mut color_series = Vec::new();
|
||||
for s in expand_amount..1 {
|
||||
for s in expand_amount..=1 {
|
||||
let darkened_color = oklch.darken(s as f32 * step);
|
||||
let srgb = Srgb::from_color(darkened_color);
|
||||
color_series.push(format!("{:x}", srgb.into_format::<u8>()));
|
||||
}
|
||||
color_series.push(format!("{:x}", origin_color.into_format::<u8>()));
|
||||
for s in 1..expand_amount {
|
||||
for s in 1..=expand_amount {
|
||||
let lightened_color = oklch.lighten(s as f32 * step);
|
||||
let srgb = Srgb::from_color(lightened_color);
|
||||
color_series.push(format!("{:x}", srgb.into_format::<u8>()));
|
||||
|
|
Loading…
Reference in New Issue
Block a user