frame.addChromaticityPoint(s.getx(), s.gety());
}
// LAB color chooser frame
LabChooserJFrame frame2 = new LabChooserJFrame(new CieXYZColorSelectedListener() {
@Override
public void onCieXYZColorSelected(double X, double Y, double Z) {
try {
double[] XYZ = {X, Y, Z};
// XYZ to xyY conversion
double x = XYZ[0]/(XYZ[0]+XYZ[1]+XYZ[2]);
double y = XYZ[1]/(XYZ[0]+XYZ[1]+XYZ[2]);
Y = Y*10;
setColor(new AbsoluteColor(new Chromaticity(x, y), Y));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
frame2.setVisible(true);
// LAB color chooser frame
HuslChooserJFrame frame3 = new HuslChooserJFrame(new CieXYZColorSelectedListener() {
@Override