Read from stdin.
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
extern crate ansi_term;
|
||||
|
||||
use std::io;
|
||||
use std::io::prelude::*;
|
||||
use std::f32::consts::PI;
|
||||
|
||||
use ansi_term::Colour::RGB;
|
||||
|
||||
fn main() {
|
||||
let stdin = io::stdin();
|
||||
|
||||
for c in stdin.lock().chars() {
|
||||
print!("{}", c.unwrap());
|
||||
}
|
||||
|
||||
let (red, green, blue) = rainbow(0.1, 0);
|
||||
|
||||
println!("{}", RGB(red, green, blue).paint("Steel blue"));
|
||||
|
||||
Reference in New Issue
Block a user