public static class FloatFilters.YCbCrFilter extends FloatFilter
FloatFilters.HSVFilter
, but edits its input colors in YCbCr color space, and multiplies rather than adds.
Y is luma, and affects how bright the color is (luma 1 is white, luma 0 is black). Cb is Chroma(blue) amd Cr is
Chroma(red), two inter-related channels that determine the hue and vividness of a specific color. When Cb and Cr
are both 0, the color is grayscale. When Cb is 0.5 and Cr is -0.5, the color is blue unless Y is very high or
low. When Cb is -0.5 and Cr is 0.5, the color is red with the same caveats re: Y. When Cb and Cr are both -0.5,
the color is green (same caveats), and when both are 0.5, the color is purple. When Y is 0.5, Cb and Cr form a
graph like this:
Constructor and Description |
---|
YCbCrFilter(float yMul) |
YCbCrFilter(float yMul,
float cbMul,
float crMul) |
Modifier and Type | Method and Description |
---|---|
float |
alter(float color)
Takes a packed float color and produces a potentially-different packed float color that this FloatFilter edited.
|
alter
public YCbCrFilter(float yMul)
public YCbCrFilter(float yMul, float cbMul, float crMul)
public float alter(float color)
alter
in class FloatFilter
color
- a packed float color, as produced by Color.toFloatBits()
Color.toFloatBits()
Copyright © Eben Howard 2012–2022. All rights reserved.