code: public static void srgbToLab( double r , double g , double b , double lab[] ) {
  		ColorXyz.srgbToXyz(r,g,b,lab);
  
  		double X = lab[0];
  		double Y = lab[1];
  		double Z = lab[2];
  
  
  		double xr = X/Xr;
  		double yr = Y/Yr;
  		double zr = Z/Zr;
  
  		double fx, fy, fz;
  		if(xr > epsilon)	fx = Math.pow(xr, 1.0 / 3.0);
  		else				fx = (kappa*xr + 16.0)/116.0;
  		if(yr > epsilon)	fy = Math.pow(yr, 1.0 / 3.0);
  		else				fy = (kappa*yr + 16.0)/116.0;
  		if(zr > epsilon)	fz = Math.pow(zr, 1.0 / 3.0);
  		else				fz = (kappa*zr + 16.0)/116.0;
  
  		lab[0] = 116.0*fy-16.0;
  		lab[1] = 500.0*(fx-fy);
  		lab[2] = 200.0*(fy-fz);
  	}
docs: Conversion from normalized RGB into LAB.  Normalized RGB values have a range of 0:1