public class NamedColorSpace extends java.awt.color.ColorSpace implements ColorSpaceOrigin
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
name |
private java.lang.String |
profileName |
private java.lang.String |
profileURI |
private static long |
serialVersionUID |
private float[] |
xyz |
CS_CIEXYZ, CS_GRAY, CS_LINEAR_RGB, CS_PYCC, CS_sRGB, TYPE_2CLR, TYPE_3CLR, TYPE_4CLR, TYPE_5CLR, TYPE_6CLR, TYPE_7CLR, TYPE_8CLR, TYPE_9CLR, TYPE_ACLR, TYPE_BCLR, TYPE_CCLR, TYPE_CMY, TYPE_CMYK, TYPE_DCLR, TYPE_ECLR, TYPE_FCLR, TYPE_GRAY, TYPE_HLS, TYPE_HSV, TYPE_Lab, TYPE_Luv, TYPE_RGB, TYPE_XYZ, TYPE_YCbCr, TYPE_Yxy
Constructor and Description |
---|
NamedColorSpace(java.lang.String name,
java.awt.Color color)
Creates a new named color.
|
NamedColorSpace(java.lang.String name,
java.awt.Color color,
java.lang.String profileName,
java.lang.String profileURI)
Creates a new named color.
|
NamedColorSpace(java.lang.String name,
float[] xyz)
Creates a new named color.
|
NamedColorSpace(java.lang.String name,
float[] xyz,
java.lang.String profileName,
java.lang.String profileURI)
Creates a new named color.
|
Modifier and Type | Method and Description |
---|---|
private void |
checkNumComponents(float[] colorvalue,
int expected) |
boolean |
equals(java.lang.Object obj) |
float[] |
fromCIEXYZ(float[] colorvalue) |
float[] |
fromRGB(float[] rgbvalue) |
java.lang.String |
getColorName()
Returns the color name.
|
float |
getMaxValue(int component) |
float |
getMinValue(int component) |
java.lang.String |
getName(int component) |
java.lang.String |
getProfileName()
Returns the name of the profile used to identify the color space in a particular context.
|
java.lang.String |
getProfileURI()
Returns the URI identifying the associate color profile.
|
java.awt.Color |
getRGBColor()
Returns an sRGB-based color representing the full-tint color defined by this named color
space.
|
float[] |
getXYZ()
Returns the XYZ coordinates of the named color.
|
int |
hashCode() |
float[] |
toCIEXYZ(float[] colorvalue) |
float[] |
toRGB(float[] colorvalue) |
java.lang.String |
toString() |
private static final long serialVersionUID
private final java.lang.String name
private final float[] xyz
private final java.lang.String profileName
private final java.lang.String profileURI
public NamedColorSpace(java.lang.String name, float[] xyz)
name
- the color namexyz
- the CIE XYZ coordinates (valid values: 0.0f to 1.0f, although
values slightly larger than 1.0f are common)public NamedColorSpace(java.lang.String name, float[] xyz, java.lang.String profileName, java.lang.String profileURI)
name
- the color namexyz
- the CIE XYZ coordinates (valid values: 0.0f to 1.0f, although
values slightly larger than 1.0f are common)profileName
- Optional profile name associated with this color spaceprofileURI
- Optional profile URI associated with this color spacepublic NamedColorSpace(java.lang.String name, java.awt.Color color, java.lang.String profileName, java.lang.String profileURI)
name
- the color namecolor
- the color to use when the named color's specific color properties are not
available.profileName
- Optional profile name associated with this color spaceprofileURI
- Optional profile URI associated with this color spacepublic NamedColorSpace(java.lang.String name, java.awt.Color color)
name
- the color namecolor
- the color to use when the named color's specific color properties are not
available.private void checkNumComponents(float[] colorvalue, int expected)
public java.lang.String getColorName()
public java.lang.String getProfileName()
getProfileName
in interface ColorSpaceOrigin
public java.lang.String getProfileURI()
getProfileURI
in interface ColorSpaceOrigin
public float[] getXYZ()
public java.awt.Color getRGBColor()
public float getMinValue(int component)
getMinValue
in class java.awt.color.ColorSpace
public float getMaxValue(int component)
getMaxValue
in class java.awt.color.ColorSpace
public java.lang.String getName(int component)
getName
in class java.awt.color.ColorSpace
public float[] fromCIEXYZ(float[] colorvalue)
fromCIEXYZ
in class java.awt.color.ColorSpace
public float[] fromRGB(float[] rgbvalue)
fromRGB
in class java.awt.color.ColorSpace
public float[] toCIEXYZ(float[] colorvalue)
toCIEXYZ
in class java.awt.color.ColorSpace
public float[] toRGB(float[] colorvalue)
toRGB
in class java.awt.color.ColorSpace
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object