{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

ColorModel

value public final class ColorModel


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

Nested types

public static class ColorModel.Companion

Public methods

final int

Returns the number of components for this color model.

@NonNull String

Public methods

getComponentCount

public final int getComponentCount()

Returns the number of components for this color model.

Returns
int

An integer between 1 and 4

toString

public @NonNull String toString()