ColorSpace

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## java.awt.color
Class ColorSpace

    java.lang.Object
      java.awt.color.ColorSpace

All Implemented Interfaces:
  Serializable

    public abstract class ColorSpace

extends Object
implements Serializable

This abstract class is used to serve as a color space tag to identify the specific color space of a Color object or, via a ColorModel object, of an Image, a BufferedImage, or a GraphicsDevice.

Note: In this Profile, the ColorSpace class only supports the sRGB color space.

sRGB is a proposed standard RGB color space. For more information, see http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html .

Version:
  10 Feb 1997
See Also:
  Serialized Form

Field Summary
`static int` | `CS_sRGB` The sRGB color space defined at http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html .
`static int` | `TYPE_RGB` Any of the family of RGB color spaces.

Method Summary
`static ColorSpace` | `getInstance(int colorspace)` Returns a ColorSpace representing one of the specific predefined color spaces.
`String` | `getName(int idx)` Returns the name of the component given the component index.
`int` | `getNumComponents()` Returns the number of components of this ColorSpace.
`int` | `getType()` Returns the color space type of this ColorSpace.
`boolean` | `isCS_sRGB()` Returns true if the ColorSpace is CS_sRGB.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TYPE_RGB

    public static final int TYPE_RGB

  Any of the family of RGB color spaces.

  See Also:
    Constant Field Values

### CS_sRGB

    public static final int CS_sRGB

  The sRGB color space defined at http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html .

  See Also:
    Constant Field Values

Method Detail

### getInstance

    public static ColorSpace getInstance(int colorspace)

  Returns a ColorSpace representing one of the specific predefined color spaces.

  Parameters:
    `colorspace` - a specific color space identified by one of the predefined class constants
  Returns:
    The requested `ColorSpace` object.

### isCS_sRGB

    public boolean isCS_sRGB()

  Returns true if the ColorSpace is CS_sRGB.

  Returns:
    `true` if this is a `CS_sRGB` color space, `false` if it is not.

### getType

    public int getType()

  Returns the color space type of this ColorSpace. The type defines the number of components of the color space and the interpretation, e.g. TYPE_RGB identifies a color space with three components - red, green, and blue. It does not define the particular color characteristics of the space, e.g. the chromaticities of the primaries.

  Returns:
    The type constant that represents the type of this `ColorSpace`.

### getNumComponents

    public int getNumComponents()

  Returns the number of components of this ColorSpace.

  Returns:
    The number of components in this `ColorSpace`.

### getName

    public String getName(int idx)

  Returns the name of the component given the component index.

  Parameters:
    `idx` - The component index.
  Returns:
    The name of the component at the specified index.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD