pastel 0.12.0

A command-line tool to generate, analyze, convert and manipulate colors
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::commands::prelude::*;

use pastel::Color;

pub struct GrayCommand;

impl GenericCommand for GrayCommand {
    fn run(&self, out: &mut Output, matches: &ArgMatches, config: &Config) -> Result<()> {
        let lightness = number_arg(matches, "lightness")?;
        let gray = Color::graytone(lightness);
        out.show_color(config, &gray)
    }
}