Advertisement
cwchen

[Rust] Using Color class

Aug 28th, 2017
3,445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.14 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement