Skip to content

Commit

Permalink
use the rgb crate instead of own struct
Browse files Browse the repository at this point in the history
  • Loading branch information
RuboGubo committed Jul 15, 2024
1 parent 775ec9f commit 2cf540e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 49 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ no-color = []

[dependencies]
lazy_static = "1"
rgb = "0.8"

[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.48"
Expand Down
45 changes: 0 additions & 45 deletions src/customcolors.rs

This file was deleted.

8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ pub mod control;
mod error;
mod style;

pub use self::customcolors::CustomColor;
pub use rgb::RGB;

/// Custom colors support.
pub mod customcolors;
pub use rgb;

pub use color::*;

Expand Down Expand Up @@ -261,7 +261,7 @@ pub trait Colorize {
fn custom_color<T>(self, color: T) -> ColoredString
where
Self: Sized,
T: Into<CustomColor>,
T: Into<RGB<u8>>,
{
let color = color.into();

Expand Down Expand Up @@ -390,7 +390,7 @@ pub trait Colorize {
fn on_custom_color<T>(self, color: T) -> ColoredString
where
Self: Sized,
T: Into<CustomColor>,
T: Into<RGB<u8>>,
{
let color = color.into();

Expand Down

0 comments on commit 2cf540e

Please sign in to comment.