Compare commits
5 commits
3e86e4f053
...
18af36ddeb
Author | SHA1 | Date | |
---|---|---|---|
18af36ddeb | |||
95bb8e9d60 | |||
e4f056a8d4 | |||
01edc65607 | |||
0070f1e6cf |
3 changed files with 44 additions and 4 deletions
|
@ -9,7 +9,9 @@ to make major changes and refactors until the main roadmap is complete.**
|
||||||
|
|
||||||
Currently supports a variety of stripe flags.
|
Currently supports a variety of stripe flags.
|
||||||
|
|
||||||
Under Construction features:
|
## Variant Flag Branch
|
||||||
- [Variant Flags](https://git.vwolfe.io/valerie/pride/src/branch/variant)
|
|
||||||
- ["Complex" Flags](https://git.vwolfe.io/valerie/pride/src/branch/complex)
|
This branch adds flag variants. Currently, it adds two for the rainbow pride flag:
|
||||||
|
- Gilbert Baker/Sex and Magic: original 1978 eight-color rainbow flag
|
||||||
|
- Philadelphia: 2017 rainbow flag with black and brown stripes
|
||||||
|
|
||||||
|
|
13
src/main.rs
13
src/main.rs
|
@ -5,6 +5,7 @@ use pico_args::Arguments;
|
||||||
mod color;
|
mod color;
|
||||||
mod draw;
|
mod draw;
|
||||||
mod flag;
|
mod flag;
|
||||||
|
mod variant;
|
||||||
|
|
||||||
use crate::color::Colors;
|
use crate::color::Colors;
|
||||||
|
|
||||||
|
@ -38,7 +39,17 @@ fn main() {
|
||||||
|
|
||||||
let colors: Colors = match subcommand.as_deref() {
|
let colors: Colors = match subcommand.as_deref() {
|
||||||
Some("pride" | "gay")
|
Some("pride" | "gay")
|
||||||
=> flag::pride(),
|
=> {
|
||||||
|
let variant = args.subcommand().unwrap_or(None);
|
||||||
|
match variant.as_deref() {
|
||||||
|
Some("8-color" | "gilbert-baker" | "sex-and-magic")
|
||||||
|
=> variant::gilbert_baker(),
|
||||||
|
Some("philadelphia")
|
||||||
|
=> variant::philadelphia(),
|
||||||
|
_
|
||||||
|
=> flag::pride()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
Some("transgender" | "trans")
|
Some("transgender" | "trans")
|
||||||
=> flag::transgender(),
|
=> flag::transgender(),
|
||||||
|
|
27
src/variant.rs
Normal file
27
src/variant.rs
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
|
||||||
|
use crate::{
|
||||||
|
color::*,
|
||||||
|
flag
|
||||||
|
};
|
||||||
|
|
||||||
|
pub fn gilbert_baker() -> Colors {
|
||||||
|
let pink = rgb(0xFF69B4); // sex
|
||||||
|
let cyan = rgb(0x00C0C0); // magic
|
||||||
|
|
||||||
|
let mut output = flag::pride();
|
||||||
|
output.insert(0, pink);
|
||||||
|
output.insert(5, cyan);
|
||||||
|
|
||||||
|
output
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn philadelphia() -> Colors {
|
||||||
|
let brown = rgb(0x784F17);
|
||||||
|
|
||||||
|
let mut output = flag::pride();
|
||||||
|
output.insert(0, BLACK);
|
||||||
|
output.insert(1, brown);
|
||||||
|
|
||||||
|
output
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue