Java Color.getColorSpace()
Syntax
Color.getColorSpace() has the following syntax.
public ColorSpace getColorSpace()
Example
In the following code shows how to use Color.getColorSpace() method.
import java.awt.Color;
// ww w . j a v a 2 s . c o m
public class Main {
public static void main(String[] args) {
Color myColor = Color.RED;
System.out.println(myColor.getColorSpace().getNumComponents());
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.awt »
Java Tutorial »
java.awt »