});
frame2.setVisible(true);
// LAB color chooser frame
HuslChooserJFrame frame3 = new HuslChooserJFrame(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*5000;
setColor(new AbsoluteColor(new Chromaticity(x, y), Y));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
frame3.setVisible(true);
ChromaticityUCSJFrame frame4 = new ChromaticityUCSJFrame(new CiexyYColorSelectedListener() {
@Override
public void onCiexyYColorSelected(double x, double y, double Y) {