Searched refs:hsl (Results 1 – 5 of 5) sorted by relevance
/frameworks/base/core/res/res/raw/ |
D | color_fade_frag.frag | 25 vec3 hsl2rgb(vec3 hsl) 27 vec3 h = vec3(hsl.x * 6.0); 32 float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y; 33 return (rgb - vec3(0.5)) * c + hsl.z; 39 vec3 hsl = rgb2hsl(color.xyz); 40 vec3 rgb = pow(hsl2rgb(vec3(hsl.x, hsl.y * saturation, hsl.z * opacity)), vec3(gamma));
|
/frameworks/support/v4/tests/java/android/support/v4/graphics/ |
D | ColorUtilsTest.java | 87 verifyColorToHSL(entry.rgb, entry.hsl); in testColorToHSL() 94 verifyHSLToColor(entry.hsl, entry.rgb); in testHSLToColor() 100 final float[] hsl = new float[3]; in testColorToHslLimits() local 103 ColorUtils.colorToHSL(entry.rgb, hsl); in testColorToHslLimits() 105 assertTrue(hsl[0] >= 0f && hsl[0] <= 360f); in testColorToHslLimits() 106 assertTrue(hsl[1] >= 0f && hsl[1] <= 1f); in testColorToHslLimits() 107 assertTrue(hsl[2] >= 0f && hsl[2] <= 1f); in testColorToHslLimits() 202 private static void verifyHSLToColor(float[] hsl, int expected) { in verifyHSLToColor() argument 203 final int actualRgb = ColorUtils.HSLToColor(hsl); in verifyHSLToColor() 260 final float[] hsl = new float[3]; field in ColorUtilsTest.TestEntry [all …]
|
/frameworks/support/v7/palette/src/main/java/android/support/v7/graphics/ |
D | Palette.java | 366 final float hsl[] = swatch.getHsl(); in shouldBeScoredForTarget() local 367 return hsl[1] >= target.getMinimumSaturation() && hsl[1] <= target.getMaximumSaturation() in shouldBeScoredForTarget() 368 && hsl[2] >= target.getMinimumLightness() && hsl[2] <= target.getMaximumLightness() in shouldBeScoredForTarget() 373 final float[] hsl = swatch.getHsl(); in generateScore() local 381 * (1f - Math.abs(hsl[1] - target.getTargetSaturation())); in generateScore() 385 * (1f - Math.abs(hsl[2] - target.getTargetLightness())); in generateScore() 440 Swatch(float[] hsl, int population) { in Swatch() argument 441 this(ColorUtils.HSLToColor(hsl), population); in Swatch() 442 mHsl = hsl; in Swatch() 919 boolean isAllowed(int rgb, float[] hsl); [all …]
|
D | ColorCutQuantizer.java | 438 private boolean shouldIgnoreColor(int rgb, float[] hsl) { in shouldIgnoreColor() argument 441 if (!mFilters[i].isAllowed(rgb, hsl)) { in shouldIgnoreColor()
|
/frameworks/support/v4/java/android/support/v4/graphics/ |
D | ColorUtils.java | 237 public static int HSLToColor(@NonNull float[] hsl) { in HSLToColor() argument 238 final float h = hsl[0]; in HSLToColor() 239 final float s = hsl[1]; in HSLToColor() 240 final float l = hsl[2]; in HSLToColor()
|