ColorSpace.Model
  public
  static
  final
  
  enum
  ColorSpace.Model
  
  
  
  
    extends Enum<ColorSpace.Model>
  
  
  
  
  
  
| java.lang.Object | ||
| ↳ | java.lang.Enum<android.graphics.ColorSpace.Model> | |
| ↳ | android.graphics.ColorSpace.Model | |
A color model is required by a ColorSpace to describe the
 way colors can be represented as tuples of numbers. A common color
 model is the RGB color model which defines a color
 as represented by a tuple of 3 numbers (red, green and blue).
Summary
| Enum values | |
|---|---|
| ColorSpace.Model | CMYKThe CMYK model is a color model with 4 components that refer to four inks used in color printing: cyan, magenta, yellow and black (or key). | 
| ColorSpace.Model | LABThe Lab model is a color model with 3 components used to describe a color space that is more perceptually uniform than XYZ. | 
| ColorSpace.Model | RGBThe RGB model is a color model with 3 components that refer to the three additive primaries: red, green and blue. | 
| ColorSpace.Model | XYZThe XYZ model is a color model with 3 components that are used to model human color vision on a basic sensory level. | 
| Public methods | |
|---|---|
| 
        
        
        
        
        
        int | 
      getComponentCount()
      Returns the number of components for this color model. | 
| 
        
        
        static
        
        
        ColorSpace.Model | 
      valueOf(String name)
       | 
| 
        
        
        static
        final
        
        Model[] | 
      values()
       | 
| Inherited methods | |
|---|---|
Enum values
CMYK
public static final ColorSpace.Model CMYK
The CMYK model is a color model with 4 components that refer to four inks used in color printing: cyan, magenta, yellow and black (or key). CMYK is a subtractive color model.
LAB
public static final ColorSpace.Model LAB
The Lab model is a color model with 3 components used to describe a color space that is more perceptually uniform than XYZ.
RGB
public static final ColorSpace.Model RGB
The RGB model is a color model with 3 components that refer to the three additive primaries: red, green and blue.
XYZ
public static final ColorSpace.Model XYZ
The XYZ model is a color model with 3 components that are used to model human color vision on a basic sensory level.
Public methods
getComponentCount
public int getComponentCount ()
Returns the number of components for this color model.
| Returns | |
|---|---|
| int | An integer between 1 and 4 Value is between 1 and 4 inclusive | 
valueOf
public static ColorSpace.Model valueOf (String name)
| Parameters | |
|---|---|
| name | String | 
| Returns | |
|---|---|
| ColorSpace.Model | |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
