Groovy web console

subscribe to the feed Subscribe
to this
site

Code Golf

Published 6 years ago by Carusocomputing with tags code golf
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
    def g(r,g,b,r2,g2,b2,s){
      (0..(1.0/s)).collect {
        c ->
        [(int)(r*s*c+r2*(1-s*c)),(int)(g*s*c+g2*(1-s*c)),(int)(b*s*c+b2*(1-s*c))]
      }
    }

    g(0,0,0,255,255,255,0.1)