def rgb2lab(color)
      r, g, b = color.r * 255, color.g * 255, color.b * 255
      r = rgb_xyz r
      g = rgb_xyz g
      b = rgb_xyz b
      x = xyz_lab (0.4124564 * r + 0.3575761 * g + 0.1804375 * b) / X
      y = xyz_lab (0.2126729 * r + 0.7151522 * g + 0.0721750 * b) / Y
      z = xyz_lab (0.0193339 * r + 0.1191920 * g + 0.9503041 * b) / Z
      [116 * y - 16, 500 * (x - y), 200 * (y - z)]
    end
def rgb2lab(color)
      r, g, b = color.r * 255, color.g * 255, color.b * 255
      r = rgb_xyz r
      g = rgb_xyz g
      b = rgb_xyz b
      x = xyz_lab (0.4124564 * r + 0.3575761 * g + 0.1804375 * b) / X
      y = xyz_lab (0.2126729 * r + 0.7151522 * g + 0.0721750 * b) / Y
      z = xyz_lab (0.0193339 * r + 0.1191920 * g + 0.9503041 * b) / Z
      [116 * y - 16, 500 * (x - y), 200 * (y - z)]
    end
来自 github 上的开源项目 chroma
 https://github.com/gka/chroma.js/blob/master/src/conversions/rgb2lab.coffee

 color - RGB颜色

 Returns [l*, a*, b*] 值。
         亮度（l*）的范围是（0-100）