minor structure changes and added a variant of the aroace flag
This commit is contained in:
parent
515f6da05c
commit
992b07edcc
2 changed files with 33 additions and 16 deletions
24
src/flag.rs
24
src/flag.rs
|
@ -20,13 +20,6 @@ pub fn pride() -> Flag {
|
||||||
Flag::Stripes(vec![red, orange, yellow, green, blue, purple])
|
Flag::Stripes(vec![red, orange, yellow, green, blue, purple])
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn transgender() -> Flag {
|
|
||||||
let pink = rgb(0x7ACBF5);
|
|
||||||
let blue = rgb(0xEAACB8);
|
|
||||||
|
|
||||||
Flag::Stripes(vec![pink, blue, WHITE, blue, pink])
|
|
||||||
}
|
|
||||||
|
|
||||||
// everything below here is alphabetical
|
// everything below here is alphabetical
|
||||||
|
|
||||||
pub fn agender() -> Flag {
|
pub fn agender() -> Flag {
|
||||||
|
@ -51,6 +44,15 @@ pub fn asexual() -> Flag {
|
||||||
Flag::Stripes(vec![BLACK, grey, WHITE, purple])
|
Flag::Stripes(vec![BLACK, grey, WHITE, purple])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn aroace() -> Flag {
|
||||||
|
let orange = rgb(0xE28D00);
|
||||||
|
let yellow = rgb(0xEBE200);
|
||||||
|
let blue = rgb(0x67B7E8);
|
||||||
|
let navy = rgb(0x203756);
|
||||||
|
|
||||||
|
Flag::Stripes(vec![orange, yellow, WHITE, blue, navy])
|
||||||
|
}
|
||||||
|
|
||||||
pub fn bigender() -> Flag {
|
pub fn bigender() -> Flag {
|
||||||
let pink = rgb(0xE676A6);
|
let pink = rgb(0xE676A6);
|
||||||
let yellow = rgb(0xF9F04C);
|
let yellow = rgb(0xF9F04C);
|
||||||
|
@ -141,3 +143,11 @@ pub fn pansexual() -> Flag {
|
||||||
Flag::Stripes(vec![magenta, yellow, cyan])
|
Flag::Stripes(vec![magenta, yellow, cyan])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn transgender() -> Flag {
|
||||||
|
let pink = rgb(0x7ACBF5);
|
||||||
|
let blue = rgb(0xEAACB8);
|
||||||
|
|
||||||
|
Flag::Stripes(vec![pink, blue, WHITE, blue, pink])
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
25
src/main.rs
25
src/main.rs
|
@ -46,14 +46,14 @@ fn main() {
|
||||||
// get small flag
|
// get small flag
|
||||||
let small = args.contains(["-s", "--small"]);
|
let small = args.contains(["-s", "--small"]);
|
||||||
|
|
||||||
let subcommand = args.subcommand().unwrap();
|
let subcommand = args.subcommand().unwrap();
|
||||||
|
let variant = args.subcommand().unwrap_or(None);
|
||||||
|
|
||||||
// get color vec from matched flag
|
// get color vec from matched flag
|
||||||
let flag: Flag = match subcommand.as_deref() {
|
let flag: Flag = match subcommand.as_deref() {
|
||||||
Some("pride" | "rainbow")
|
Some("pride" | "rainbow")
|
||||||
| None
|
| None
|
||||||
=> {
|
=> {
|
||||||
let variant = args.subcommand().unwrap_or(None);
|
|
||||||
match variant.as_deref() {
|
match variant.as_deref() {
|
||||||
Some("8-color" | "gilbert-baker" | "sex-and-magic")
|
Some("8-color" | "gilbert-baker" | "sex-and-magic")
|
||||||
=> variant::gilbert_baker(),
|
=> variant::gilbert_baker(),
|
||||||
|
@ -66,8 +66,8 @@ fn main() {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
Some("transgender" | "trans")
|
Some("progress")
|
||||||
=> flag::transgender(),
|
=> complex::progress(small),
|
||||||
|
|
||||||
|
|
||||||
Some("agender")
|
Some("agender")
|
||||||
|
@ -80,7 +80,14 @@ fn main() {
|
||||||
=> flag::asexual(),
|
=> flag::asexual(),
|
||||||
|
|
||||||
Some("aroace" | "aromantic-asexual")
|
Some("aroace" | "aromantic-asexual")
|
||||||
=> complex::aroace(small),
|
=> {
|
||||||
|
match variant.as_deref() {
|
||||||
|
Some("halves" | "side-by-side" | "sbs")
|
||||||
|
=> complex::aroace(small),
|
||||||
|
_
|
||||||
|
=> flag::aroace()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
Some("bigender")
|
Some("bigender")
|
||||||
=> flag::bigender(),
|
=> flag::bigender(),
|
||||||
|
@ -112,8 +119,8 @@ fn main() {
|
||||||
Some("gendervoid")
|
Some("gendervoid")
|
||||||
=> flag::gendervoid(),
|
=> flag::gendervoid(),
|
||||||
|
|
||||||
Some("intersex")
|
// Some("intersex")
|
||||||
=> complex::intersex(),
|
// => complex::intersex(),
|
||||||
|
|
||||||
Some("lesbian")
|
Some("lesbian")
|
||||||
=> flag::lesbian(),
|
=> flag::lesbian(),
|
||||||
|
@ -130,8 +137,8 @@ fn main() {
|
||||||
Some("polyamory" | "polyamorous" | "poly")
|
Some("polyamory" | "polyamorous" | "poly")
|
||||||
=> complex::polyamory(small),
|
=> complex::polyamory(small),
|
||||||
|
|
||||||
Some("progress")
|
Some("transgender" | "trans")
|
||||||
=> complex::progress(small),
|
=> flag::transgender(),
|
||||||
|
|
||||||
_ => { help_text(); exit(1) }
|
_ => { help_text(); exit(1) }
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue