Java tutorial
import java.awt.Color; import java.awt.color.ColorSpace; import java.util.Arrays; public class Main { public static void main(String[] args) { Color myColor = new Color(ColorSpace.getInstance(ColorSpace.CS_CIEXYZ), new float[] { 0.1F, 0.2F, 0.3F }, 0.4F); System.out.println(Arrays.toString(myColor.getColorComponents(null))); } }