Java android.graphics Color fields, constructors, methods, implement or subclass

Example usage for Java android.graphics Color fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.graphics Color.

The text is from its open source code.

Field

Constructor

Color()
Creates a new color instance set to opaque black in the ColorSpace.Named#SRGB sRGB color space.

Method

floatalpha(@ColorLong long color)
Returns the alpha component encoded in the specified color long.
intalpha(int color)
Return the alpha component of a color int.
intargb(@IntRange(from = 0, to = 255) int alpha, @IntRange(from = 0, to = 255) int red, @IntRange(from = 0, to = 255) int green, @IntRange(from = 0, to = 255) int blue)
Return a color-int from alpha, red, green, blue components.
intargb(float alpha, float red, float green, float blue)
Return a color-int from alpha, red, green, blue float components in the range \([0..1]\).
voidcolorToHSV(@ColorInt int color, @Size(3) float hsv[])
Convert the ARGB color to its HSV components.
intHSVToColor(@Size(3) float hsv[])
Convert HSV components to an ARGB color.
intHSVToColor(@IntRange(from = 0, to = 255) int alpha, @Size(3) float hsv[])
Convert HSV components to an ARGB color.
intparseColor(@Size(min = 1) String colorString)

Parse the color string, and return the corresponding color-int.
intrgb(@IntRange(from = 0, to = 255) int red, @IntRange(from = 0, to = 255) int green, @IntRange(from = 0, to = 255) int blue)
Return a color-int from red, green, blue components.
intrgb(float red, float green, float blue)
Return a color-int from red, green, blue float components in the range \([0..1]\).
voidRGBToHSV(@IntRange(from = 0, to = 255) int red, @IntRange(from = 0, to = 255) int green, @IntRange(from = 0, to = 255) int blue, @Size(3) float hsv[])
Convert RGB components to HSV.