Skip to content

Instantly share code, notes, and snippets.

@YoshiTheChinchilla
Created February 16, 2021 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YoshiTheChinchilla/2fc00189b4ef2826156dfb01ec163c2f to your computer and use it in GitHub Desktop.
Save YoshiTheChinchilla/2fc00189b4ef2826156dfb01ec163c2f to your computer and use it in GitHub Desktop.
fn to_rgb(r: usize, g: usize, b: usize) -> String {
format!("#{:02X}{:02X}{:02X}", r, g, b)
}
fn main() {
// let mut args = std::env::args();
// args.skip().next().unwrap(), args.next().unwrap(), args.next().unwrap()
assert_eq!(to_rgb(200, 15, 1), "#C80F01");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment