Package squidpony.squidgrid.gui.gdx
Class FloatFilters.ColorizeFilter
java.lang.Object
squidpony.squidgrid.gui.gdx.FloatFilter
squidpony.squidgrid.gui.gdx.FloatFilters.ColorizeFilter
- Enclosing class:
- FloatFilters
public static class FloatFilters.ColorizeFilter extends FloatFilter
Changes all colors this alters to have the same hue as, and a closer saturation to, a target color given in the
constructor, as well as optionally multiplying saturation of the result and/or adding lightness/value. A good
example usage of this is to make a sepia-tone effect with
new FloatFilters.ColorizeFilter(SColor.CLOVE_BROWN, 0.6f, 0.0f)
.-
Field Summary
Fields Modifier and Type Field Description float
lumaAddend
float
targetCb
float
targetCr
-
Constructor Summary
Constructors Constructor Description ColorizeFilter(float color)
ColorizeFilter(float color, float chromaMul, float lumaAdd)
ColorizeFilter(com.badlogic.gdx.graphics.Color color)
ColorizeFilter(com.badlogic.gdx.graphics.Color color, float chromaMul, float lumaAdd)
-
Method Summary
Modifier and Type Method Description float
alter(float color)
Takes a packed float color and produces a potentially-different packed float color that this FloatFilter edited.
-
Field Details
-
Constructor Details
-
Method Details
-
alter
Takes a packed float color and produces a potentially-different packed float color that this FloatFilter edited.- Specified by:
alter
in classFloatFilter
- Parameters:
color
- a packed float color, as produced byColor.toFloatBits()
- Returns:
- a packed float color, as produced by
Color.toFloatBits()
-