Created
February 16, 2021 05:08
-
-
Save YoshiTheChinchilla/2fc00189b4ef2826156dfb01ec163c2f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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