Class GssFunctions.BlendColorsRgb

java.lang.Object
com.google.common.css.compiler.gssfunctions.GssFunctions.BaseBlendColors
com.google.common.css.compiler.gssfunctions.GssFunctions.BlendColorsRgb
All Implemented Interfaces:
GssFunction
Enclosing class:
GssFunctions

public static class GssFunctions.BlendColorsRgb extends GssFunctions.BaseBlendColors
Implementation of the blendColorsRgb GSS function. Returns a color half way between the two colors by averaging each of red, green and blue.
  • Constructor Details

    • BlendColorsRgb

      public BlendColorsRgb()
  • Method Details

    • blend

      public String blend(String startColorStr, String endColorStr)
      Returns the string representation in hex format for a color half way in between the two supplied colors by averaging each of red, green and blue.
      Specified by:
      blend in class GssFunctions.BaseBlendColors
      Parameters:
      startColorStr - The start color in string form
      endColorStr - The endcolor in string form
      Returns:
      The computed color