Interface CSSColorMixFunction

All Superinterfaces:
Cloneable, CSSColorValue, CSSPrimitiveValue, CSSTypedValue, CSSValue

public interface CSSColorMixFunction extends CSSColorValue
color-mix() function.
  • Method Details

    • getCSSColorSpace

      String getCSSColorSpace()
      Gets the interpolation color space, as defined by CSS.

      Beware that this color space may be different from the one reported by the interpolated color, given that CSS considers hsl and hwb as color spaces despite the actual color space being sRGB.

      Returns:
      the interpolation color space.
    • getColorValue1

      CSSPrimitiveValue getColorValue1()
      The first color value.
      Returns:
      the first color value.
    • getColorValue2

      CSSPrimitiveValue getColorValue2()
      The second color value.
      Returns:
      the second color value.
    • getPercentage1

      CSSPrimitiveValue getPercentage1()
      Gives the percentage that applies to the first color.
      Returns:
      the percentage or null if no percentage was explicitly set.
    • getPercentage2

      CSSPrimitiveValue getPercentage2()
      Gives the percentage that applies to the second color.
      Returns:
      the percentage or null if no percentage was explicitly set.
    • clone

      Description copied from interface: CSSColorValue
      Creates and returns a copy of this value.
      Specified by:
      clone in interface CSSColorValue
      Specified by:
      clone in interface CSSValue
      Returns:
      a clone of this value.