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 = Color.RED; System.out.println( Arrays.toString(myColor.getComponents(ColorSpace.getInstance(ColorSpace.CS_CIEXYZ), null))); } }