Compare commits

..

5 commits

3 changed files with 44 additions and 4 deletions

View file

@ -9,7 +9,9 @@ to make major changes and refactors until the main roadmap is complete.**
Currently supports a variety of stripe flags.
Under Construction features:
- [Variant Flags](https://git.vwolfe.io/valerie/pride/src/branch/variant)
- ["Complex" Flags](https://git.vwolfe.io/valerie/pride/src/branch/complex)
## Variant Flag Branch
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

View file

@ -5,6 +5,7 @@ use pico_args::Arguments;
mod color;
mod draw;
mod flag;
mod variant;
use crate::color::Colors;
@ -38,7 +39,17 @@ fn main() {
let colors: Colors = match subcommand.as_deref() {
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")
=> flag::transgender(),

27
src/variant.rs Normal file
View 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
}