R/closestColor.R

closestColor = function(x, colscale){
    choices = rev(heat.colors(length(colscale)))
    diffs = abs(x-colscale)
    return(choices[which.min(diffs)])
}
alyssafrazee/ballgown-release documentation built on May 12, 2019, 1:40 a.m.