Class GssFunctions.MakeMutedColor
java.lang.Object
com.google.common.css.compiler.gssfunctions.GssFunctions.MakeMutedColor
- All Implemented Interfaces:
GssFunction
- Enclosing class:
- GssFunctions
Implementation of the makeMutedColor GSS function. This is intended to
generate a muted flavor of a text or link color. Takes three arguments: the
background color over which this text or link will appear, and the text or
link color this should be a muted version of and optionally the loss of
saturation for muted tone (0 <= loss <= 1).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCallResultNodes(List<CssValueNode> args, ErrorManager errorManager) Returns the muted color corresponding to the arguments documented inGssFunctions.MakeMutedColor.getCallResultString(List<String> args) Processes a list of strings as function arguments and returns a string result.Returns the number of expected arguments of this GSS function.protected StringmakeMutedColor(String backgroundColorStr, String foregroundColorStr) protected StringmakeMutedColor(String backgroundColorStr, String foregroundColorStr, String lossStr)
-
Constructor Details
-
MakeMutedColor
public MakeMutedColor()
-
-
Method Details
-
getNumExpectedArguments
Returns the number of expected arguments of this GSS function.- Specified by:
getNumExpectedArgumentsin interfaceGssFunction- Returns:
- Number of expected arguments
-
getCallResultNodes
public List<CssValueNode> getCallResultNodes(List<CssValueNode> args, ErrorManager errorManager) throws GssFunctionException Returns the muted color corresponding to the arguments documented inGssFunctions.MakeMutedColor.- Specified by:
getCallResultNodesin interfaceGssFunction- Parameters:
args- The list of arguments.- Returns:
- The generated muted color.
- Throws:
GssFunctionException
-
makeMutedColor
-
makeMutedColor
-
getCallResultString
Description copied from interface:GssFunctionProcesses a list of strings as function arguments and returns a string result. Errors are reported by throwingGssFunctionException.- Specified by:
getCallResultStringin interfaceGssFunction- Throws:
GssFunctionException
-