added colors, list entries, and match arms for three "complex" flags (progress, polyam, intersex)

This commit is contained in:
Valerie Wolfe 2023-04-13 15:41:38 -04:00
parent 5e56206086
commit a003aaa797
4 changed files with 42 additions and 3 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "pride"
version = "0.0.1"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View file

@ -49,4 +49,3 @@ pub fn draw(colors: &[Fg<Rgb>]) {
stdout.flush().ok();
}

View file

@ -5,6 +5,21 @@ use crate::draw::draw;
pub static BLOCK: &str = "";
pub fn progress(small: bool) {
let red = color::Fg(color::Rgb(0xE5, 0x00, 0x00));
let orange = color::Fg(color::Rgb(0xFF, 0x8D, 0x00));
let yellow = color::Fg(color::Rgb(0xFF, 0xEE, 0x00));
let green = color::Fg(color::Rgb(0x02, 0x81, 0x21));
let blue = color::Fg(color::Rgb(0x00, 0x4C, 0xFF));
let purple = color::Fg(color::Rgb(0x77, 0x00, 0x88));
let white = color::Fg(color::Rgb(0xFF, 0xFF, 0xFF));
let pink = color::Fg(color::Rgb(0x7A, 0xCB, 0xF5));
let ltblue = color::Fg(color::Rgb(0xEA, 0xAC, 0xB8));
let brown = color::Fg(color::Rgb(0x61, 0x39, 0x15));
let black = color::Fg(color::Rgb(0x00, 0x00, 0x00));
}
pub fn pride(small: bool) {
let red = color::Fg(color::Rgb(0xE5, 0x00, 0x00));
let orange = color::Fg(color::Rgb(0xFF, 0x8D, 0x00));
@ -127,6 +142,11 @@ pub fn gendervoid(small: bool) {
} else { draw(&[navy, gray, black, gray, navy]); }
}
pub fn intersex(small: bool) {
let yellow = color::Fg(color::Rgb(0xFF, 0xDA, 0x00));
let purple = color::Fg(color::Rgb(0x7A, 0x00, 0xAC));
}
pub fn lesbian(small: bool) {
let red = color::Fg(color::Rgb(0xD6, 0x28, 0x00));
let orange = color::Fg(color::Rgb(0xFF, 0x9B, 0x56));
@ -194,3 +214,12 @@ pub fn pansexual(small: bool) {
} else { draw(&[magenta, yellow, cyan]); }
}
pub fn polyamorous() {
let blue = color::Fg(color::Rgb(0x01, 0x9F, 0xE3));
let magenta = color::Fg(color::Rgb(0xE5, 0x00, 0x51));
let purple = color::Fg(color::Rgb(0x34, 0x0C, 0x46));
let white = color::Fg(color::Rgb(0xFF, 0xFF, 0xFF));
let yellow = color::Fg(color::Rgb(0x00, 0xFC, 0xBF));
}

View file

@ -25,6 +25,8 @@ fn main() {
let subcommand = args.subcommand().unwrap();
match subcommand.as_deref() {
Some("progress") => flag::progress(small),
Some("pride") |
Some("gay") => flag::pride(small),
@ -45,6 +47,8 @@ fn main() {
Some("gendervoid") => flag::gendervoid(small),
Some("intersex") => flag::intersex(small),
Some("lesbian") => flag::lesbian(small),
Some("multigender") => flag::multigender(small),
@ -55,6 +59,11 @@ fn main() {
Some("pan") |
Some("pansexual") => flag::pansexual(small),
Some("poly") |
Some("polyam") |
Some("polyamory") |
Some("polyamorous") => flag::polyamorous(),
_ => { help_text(); exit(1) }
}
}
@ -87,11 +96,13 @@ fn list_text() {
println!(" bi, bisexual bisexual pride flag");
println!(" gay, pride six-color rainbow flag");
println!(" gendervoid gendervoid pride flag");
println!(" intersex intersex pride flag");
println!(" lesbian lesbian pride flag");
println!(" multigender multigender pride flag");
println!(" nb, nonbinary nonbinary pride flag");
println!(" pan, pansexual pansexual pride flag");
// println!(" progress progress arrow flag");
println!(" poly, polyamory polyamorous pride flag");
println!(" progress progress arrow flag");
println!(" trans, transgender transgender pride flag");
}