Class GssFunctions.BaseBlendColors
java.lang.Object
com.google.common.css.compiler.gssfunctions.GssFunctions.BaseBlendColors
- All Implemented Interfaces:
GssFunction
- Direct Known Subclasses:
GssFunctions.BlendColorsHsb,GssFunctions.BlendColorsRgb
- Enclosing class:
- GssFunctions
Base implementation of the color blending GSS function. Returns a color
half way between the two colors supplied as arguments.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringgetCallResultNodes(List<CssValueNode> args, ErrorManager errorManager) Returns the string representation in hex format for a color half way in between the two supplied colors.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.
-
Constructor Details
-
BaseBlendColors
public BaseBlendColors()
-
-
Method Details
-
getNumExpectedArguments
Returns the number of expected arguments of this GSS function.- Specified by:
getNumExpectedArgumentsin interfaceGssFunction- Returns:
- Number of expected arguments
-
getCallResultNodes
Returns the string representation in hex format for a color half way in between the two supplied colors.- Specified by:
getCallResultNodesin interfaceGssFunction- Parameters:
args- The list of arguments- Returns:
- The computed color
-
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
-
blend
-