Class GssFunctions.BaseHslColorManipulation
java.lang.Object
com.google.common.css.compiler.gssfunctions.GssFunctions.BaseHslColorManipulation
- Direct Known Subclasses:
GssFunctions.Darken,GssFunctions.DesaturateColor,GssFunctions.Greyscale,GssFunctions.Lighten,GssFunctions.SaturateColor,GssFunctions.Spin
- Enclosing class:
- GssFunctions
Abstract base class providing HSL color space manipulation functions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringaddHslToCssColor(String baseColorString, int hueToAdd, int saturationToAdd, int lightnessToAdd) Takes a CSS color string, and adds the specified amount of hue, saturation and lightness to it in HSL color spaceprotected StringaddHslToCssColor(String baseColorString, String hueToAdd, String saturationToAdd, String lightnessToAdd)
-
Constructor Details
-
BaseHslColorManipulation
public BaseHslColorManipulation()
-
-
Method Details
-
addHslToCssColor
protected String addHslToCssColor(String baseColorString, String hueToAdd, String saturationToAdd, String lightnessToAdd) throws GssFunctionException - Throws:
GssFunctionException
-
addHslToCssColor
protected String addHslToCssColor(String baseColorString, int hueToAdd, int saturationToAdd, int lightnessToAdd) Takes a CSS color string, and adds the specified amount of hue, saturation and lightness to it in HSL color space- Parameters:
baseColorString- The string representing the color to changehueToAdd- The amount of hue to add (can be negative)saturationToAdd- The amount of saturation to add (can be negative)lightnessToAdd- The amount of lightness to add (can be negative)- Returns:
- A CSS String representing the new color
-