Skip to content

Commit

Permalink
fix: update material-colors to 0.3.1 (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
InioX committed May 5, 2024
1 parent e795cda commit f2cb888
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ reqwest = { version = "0.11.23", default_features = false, features = [
"blocking",
"rustls-tls",
] }
material-colors = { version = "0.2.1", features = ["image"] }
material-colors = { version = "0.3.1", features = ["image"] }
ahash = "0.8.7"
indexmap = "2.2.2"
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::util::{

use indexmap::IndexMap;

use material_colors::{Argb, Scheme};
use material_colors::{color::Argb, scheme::Scheme};

use clap::{Parser, ValueEnum};
use color_eyre::{eyre::Result, Report};
Expand Down
6 changes: 3 additions & 3 deletions src/util/color.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use material_colors::dynamic_color::dynamic_scheme::DynamicScheme;
use material_colors::dynamic_color::material_dynamic_colors::MaterialDynamicColors;
use material_colors::utils::theme::{ColorGroup, CustomColor, CustomColorGroup};
use material_colors::theme::{ColorGroup, CustomColor, CustomColorGroup};
use material_colors::{
Argb, FilterType, Hct, ImageReader, SchemeContent, SchemeExpressive, SchemeFidelity,
SchemeFruitSalad, SchemeMonochrome, SchemeNeutral, SchemeRainbow, SchemeTonalSpot,
color::Argb, image::FilterType, hct::Hct, image::ImageReader, scheme::variant::{SchemeContent, SchemeExpressive, SchemeFidelity,
SchemeFruitSalad, SchemeMonochrome, SchemeNeutral, SchemeRainbow, SchemeTonalSpot},
};
use owo_colors::{OwoColorize, Style};

Expand Down
9 changes: 4 additions & 5 deletions src/util/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use directories::ProjectDirs;
use material_colors::utils::color::ParseRgbError;
use material_colors::Argb;
use material_colors::color::Argb;
use std::fs;
use std::path::PathBuf;
use std::{collections::HashMap, str::FromStr};
Expand Down Expand Up @@ -31,14 +30,14 @@ impl CustomColor {
pub fn to_custom_color(
&self,
name: String,
) -> Result<material_colors::utils::theme::CustomColor, ParseRgbError> {
) -> Result<material_colors::theme::CustomColor, material_colors::error::Error> {
Ok(match self {
CustomColor::Color(color) => material_colors::utils::theme::CustomColor {
CustomColor::Color(color) => material_colors::theme::CustomColor {
value: Argb::from_str(color)?,
blend: true,
name,
},
CustomColor::Options { color, blend } => material_colors::utils::theme::CustomColor {
CustomColor::Options { color, blend } => material_colors::theme::CustomColor {
value: Argb::from_str(color)?,
blend: *blend,
name,
Expand Down
2 changes: 1 addition & 1 deletion src/util/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use color_eyre::Help;
use color_eyre::{eyre::Result, Report};

use colorsys::{ColorAlpha, Hsl};
use material_colors::Argb;
use material_colors::color::Argb;
use serde::{Deserialize, Serialize};

use upon::Value;
Expand Down

0 comments on commit f2cb888

Please sign in to comment.