Java android.support.v4.graphics ColorUtils fields, constructors, methods, implement or subclass

Example usage for Java android.support.v4.graphics ColorUtils fields, constructors, methods, implement or subclass

Introduction

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

The text is from its open source code.

Method

intblendARGB(@ColorInt int color1, @ColorInt int color2, @FloatRange(from = 0.0, to = 1.0) float ratio)
Blend between two ARGB colors using the given ratio.
doublecalculateContrast(@ColorInt int foreground, @ColorInt int background)
Returns the contrast ratio between foreground and background .
doublecalculateLuminance(@ColorInt int color)
Returns the luminance of a color as a float between 0.0 and 1.0 .
voidcolorToHSL(@ColorInt int color, @NonNull float[] outHsl)
Convert the ARGB color to its HSL (hue-saturation-lightness) components.
voidcolorToLAB(@ColorInt int color, @NonNull double[] outLab)
Convert the ARGB color to its CIE Lab representative components.
intcompositeColors(@ColorInt int foreground, @ColorInt int background)
Composite two potentially translucent colors over each other and returns the result.
doubledistanceEuclidean(@NonNull double[] labX, @NonNull double[] labY)
Returns the euclidean distance between two LAB colors.
intHSLToColor(@NonNull float[] hsl)
Convert HSL (hue-saturation-lightness) components to a RGB color.
voidRGBToHSL(@IntRange(from = 0x0, to = 0xFF) int r, @IntRange(from = 0x0, to = 0xFF) int g, @IntRange(from = 0x0, to = 0xFF) int b, @NonNull float[] outHsl)
Convert RGB components to HSL (hue-saturation-lightness).
intsetAlphaComponent(@ColorInt int color, @IntRange(from = 0x0, to = 0xFF) int alpha)
Set the alpha component of color to be alpha .