Skip to content

Instantly share code, notes, and snippets.

@scorphus
Created October 11, 2020 22:30
Show Gist options
  • Select an option

  • Save scorphus/edba3ad5c615fd9ee0992aa81960110d to your computer and use it in GitHub Desktop.

Select an option

Save scorphus/edba3ad5c615fd9ee0992aa81960110d to your computer and use it in GitHub Desktop.

Revisions

  1. scorphus created this gist Oct 11, 2020.
    6 changes: 6 additions & 0 deletions playground.rs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    fn main() {
    for shade in 0..242 {
    let opacity = 13f32 / (255f32 - shade as f32);
    println!("opacity:{:0.3};fill:#{:06x}", opacity, shade * 65793);
    }
    }