Example usage for java.awt Color getComponents

List of usage examples for java.awt Color getComponents

Introduction

In this page you can find the example usage for java.awt Color getComponents.

Prototype

public float[] getComponents(ColorSpace cspace, float[] compArray) 

Source Link

Document

Returns a float array containing the color and alpha components of the Color , in the ColorSpace specified by the cspace parameter.

Usage

From source file:Main.java

public static void main(String[] args) {

    Color myColor = Color.RED;

    System.out.println(/*  www .j  a  v a 2 s  .c  o m*/
            Arrays.toString(myColor.getComponents(ColorSpace.getInstance(ColorSpace.CS_CIEXYZ), null)));

}