Package squidpony.squidgrid.gui.gdx
Class Filters.ColorizeFilter
java.lang.Object
squidpony.squidgrid.gui.gdx.Filters.ColorizeFilter
- All Implemented Interfaces:
IFilter<com.badlogic.gdx.graphics.Color>
- Enclosing class:
- Filters
public static class Filters.ColorizeFilter extends Object implements IFilter<com.badlogic.gdx.graphics.Color>
An IFilter that is constructed with a color and makes any color it is told to alter have the same hue as the given
color, have saturation that is somewhere between the given color's and the altered colors, and chiefly is
distinguishable from other colors by value. Useful for sepia effects, which can be created satisfactorily with
new Filters.ColorizeFilter(SColor.CLOVE_BROWN, 0.6f, 0.0f)
.-
Field Summary
Fields Modifier and Type Field Description float
saturationMultiplier
float
targetHue
float
targetSaturation
float
valueModifier
-
Constructor Summary
Constructors Constructor Description ColorizeFilter(float r, float g, float b)
Sets up a ColorizeFilter with the desired color to colorize towards.ColorizeFilter(float r, float g, float b, float saturationMultiplier, float valueModifier)
Sets up a ColorizeFilter with the desired color to colorize towards.ColorizeFilter(com.badlogic.gdx.graphics.Color color)
Sets up a ColorizeFilter with the desired color to colorize towards.ColorizeFilter(com.badlogic.gdx.graphics.Color color, float saturationMultiplier, float valueModifier)
Sets up a ColorizeFilter with the desired color to colorize towards. -
Method Summary
Modifier and Type Method Description com.badlogic.gdx.graphics.Color
alter(float r, float g, float b, float a)
-
Field Details
-
Constructor Details
-
ColorizeFilter
Sets up a ColorizeFilter with the desired color to colorize towards.- Parameters:
r
- the red component to colorize towardsg
- the green component to colorize towardsb
- the blue component to colorize towards
-
ColorizeFilter
Sets up a ColorizeFilter with the desired color to colorize towards.- Parameters:
color
- the Color to colorize towards
-
ColorizeFilter
Sets up a ColorizeFilter with the desired color to colorize towards.- Parameters:
r
- the red component to colorize towardsg
- the green component to colorize towardsb
- the blue component to colorize towardssaturationMultiplier
- a multiplier to apply to the final color's saturation; may be greater than 1valueModifier
- a modifier that affects the final brightness value of any color this alters; typically very small, such as in the -0.2f to 0.2f range
-
ColorizeFilter
public ColorizeFilter(com.badlogic.gdx.graphics.Color color, float saturationMultiplier, float valueModifier)Sets up a ColorizeFilter with the desired color to colorize towards.- Parameters:
color
- the Color to colorize towardssaturationMultiplier
- a multiplier to apply to the final color's saturation; may be greater than 1valueModifier
- a modifier that affects the final brightness value of any color this alters; typically very small, such as in the -0.2f to 0.2f range
-
-
Method Details