Skip to content

Most visited

Recently visited

navigation

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  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). 

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. 

ColorSpace.Model  RGB

The RGB model is a color model with 3 components that refer to the three additive primiaries: red, green andd blue. 

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

int getComponentCount()

Returns the number of components for this color model.

static ColorSpace.Model valueOf(String name)
static final Model[] values()

Inherited methods

From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum values

CMYK

added in API level 26
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

added in API level 26
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

added in API level 26
ColorSpace.Model RGB

The RGB model is a color model with 3 components that refer to the three additive primiaries: red, green andd blue.

XYZ

added in API level 26
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

added in API level 26
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

added in API level 26
ColorSpace.Model valueOf (String name)

Parameters
name String

Returns
ColorSpace.Model

values

added in API level 26
Model[] values ()

Returns
Model[]

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)