daily pastebin goal
62%
SHARE
TWEET

[Rust] Using Color class

cwchen Aug 28th, 2017 343 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn main() {
  2.     let green = Color::from_hsl(120, 1.0, 0.5);
  3.     let (r, g, b) = green.rgb();
  4.     println!("{} {} {}", r, g, b);  // 0 255 0
  5. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top