function stepcolor(hex, value, limit) {
    limit = limit || 255;
    var rxb = typeof hex === 'string' ? hex2rxb(hex) : hex;

    var r = rxb[0];
    var x = rxb[1];
    var b = rxb[2];

    var stepR, stepX, stepB;
    if (value > 0) {
      stepR = (limit - r) / limit;
      stepX = (limit - x) / limit;
      stepB = (limit - b) / limit;
    } else {
      stepR = r / limit;
      stepX = x / limit;
      stepB = b / limit;
    }

    r += stepR * value * limit;
    x += stepX * value * limit;
    b += stepB * value * limit;

    return [clamp(r), clamp(x), clamp(b)];
  }
/**
   * Given an RXB array and value, calculate
   * the actual values by darkening or lightening the color
   *
   * @param hex    {array} an array or hex string of an RYB value
   * @param value  {float} a number -1>=value<=1 representing the value to step the color
   * @param limit  {int}   the upper limit of the color range, defaults to 255
   */
Given an RXB array and value, calculate
the actual values by darkening or lightening the color

@param hex    {array} an array or hex string of an RYB value
@param value  {float} a number -1>=value<=1 representing the value to step the color
@param limit  {int}   the upper limit of the color range, defaults to 255
Given an RXB array and value calculate the actual values by darkening or lightening the color @param hex { array } an array or hex string of an RYB value @param value { float } a number - 1 > = value< = 1 representing the value to step the color @param limit { int } the upper limit of the color range defaults to 255
function stepcolor(hex, value, limit) {
    limit = limit || 255;
    var rxb = typeof hex === 'string' ? hex2rxb(hex) : hex;
    var r = rxb[0];
    var x = rxb[1];
    var b = rxb[2];
    var stepR, stepX, stepB;
    if (value > 0) {
      stepR = (limit - r) / limit;
      stepX = (limit - x) / limit;
      stepB = (limit - b) / limit;
    } else {
      stepR = r / limit;
      stepX = x / limit;
      stepB = b / limit;
    }
    r += stepR * value * limit;
    x += stepX * value * limit;
    b += stepB * value * limit;
    return [clamp(r), clamp(x), clamp(b)];
  }
function stepcolor ( hex , value , limit ) { limit = limit || 255 ; var rxb = typeof hex === 'string' ? hex2rxb ( hex ) : hex ; var r = rxb [ 0 ] ; var x = rxb [ 1 ] ; var b = rxb [ 2 ] ; var stepR , stepX , stepB ; if ( value > 0 ) { stepR = ( limit - r ) / limit ; stepX = ( limit - x ) / limit ; stepB = ( limit - b ) / limit ; } else { stepR = r / limit ; stepX = x / limit ; stepB = b / limit ; } r += stepR * value * limit ; x += stepX * value * limit ; b += stepB * value * limit ; return [ clamp ( r ) , clamp ( x ) , clamp ( b ) ] ; }
Given an RXB array and value, calculate
 the actual values by darkening or lightening the color
Given an RXB array and value calculate the actual values by darkening or lightening the color