R/sky.colors.R

Defines functions sky.colors

Documented in sky.colors

sky.colors = function(n){
  nred = floor(n/2)
  nblue = ceiling(n/2) - 1
  sred = seq(0.25, 1, length.out = nred + 1)[1:nred]
  sblue = seq(1, 0.25, length.out = nblue + 1)[1:nblue + 1]

  reds = rgb(1, sred, sred^3)
  white = rgb(1, 1, 1)
  blues = rgb(sblue^3, sblue, 1)
  return(rev(c(reds, white, blues)))
}

Try the AtmRay package in your browser

Any scripts or data that you put into this service are public.

AtmRay documentation built on May 2, 2019, 6:52 a.m.