Class GssFunctions.AddHsbToCssColor

  • All Implemented Interfaces:
    GssFunction
    Enclosing class:
    GssFunctions

    public static class GssFunctions.AddHsbToCssColor
    extends java.lang.Object
    implements GssFunction
    Implementation of the addHsbToCssColor GSS function.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String addHsbToCssColor​(java.lang.String baseColorString, int hueToAdd, int saturationToAdd, int brightnessToAdd)
      Takes a CSS color string, and adds the specified amount of hue, saturation and brightness to it.
      protected java.lang.String addHsbToCssColor​(java.lang.String baseColorString, java.lang.String hueToAdd, java.lang.String saturationToAdd, java.lang.String brightnessToAdd)  
      java.awt.Color addValuesToHsbComponents​(java.awt.Color baseColor, int hueToAdd, int saturationToAdd, int brightnessToAdd)
      Adds the specified amount to the specified HSB (Hue, Saturation, Brightness) parameter of the given color.
      java.util.List<CssValueNode> getCallResultNodes​(java.util.List<CssValueNode> args, ErrorManager errorManager)
      Processes a list of function call arguments and returns a list of CssNodes representing this call's output, which replace the input nodes in the AST.
      java.lang.String getCallResultString​(java.util.List<java.lang.String> args)
      Processes a list of strings as function arguments and returns a string result.
      java.lang.Integer getNumExpectedArguments()
      Returns the number of parsed arguments that this function takes, or null if the number of arguments may vary.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AddHsbToCssColor

        public AddHsbToCssColor()
    • Method Detail

      • getNumExpectedArguments

        public java.lang.Integer getNumExpectedArguments()
        Description copied from interface: GssFunction
        Returns the number of parsed arguments that this function takes, or null if the number of arguments may vary.
        Specified by:
        getNumExpectedArguments in interface GssFunction
      • addHsbToCssColor

        protected java.lang.String addHsbToCssColor​(java.lang.String baseColorString,
                                                    java.lang.String hueToAdd,
                                                    java.lang.String saturationToAdd,
                                                    java.lang.String brightnessToAdd)
                                             throws GssFunctionException
        Throws:
        GssFunctionException
      • addHsbToCssColor

        public java.lang.String addHsbToCssColor​(java.lang.String baseColorString,
                                                 int hueToAdd,
                                                 int saturationToAdd,
                                                 int brightnessToAdd)
        Takes a CSS color string, and adds the specified amount of hue, saturation and brightness to it.
        Parameters:
        baseColorString - The string representing the color to change
        hueToAdd - The amount of hue to add (can be negative)
        saturationToAdd - The amount of saturation to add (can be negative)
        brightnessToAdd - The amount of brightness to add (can be negative)
        Returns:
        A CSS String representing the new color
      • addValuesToHsbComponents

        public java.awt.Color addValuesToHsbComponents​(java.awt.Color baseColor,
                                                       int hueToAdd,
                                                       int saturationToAdd,
                                                       int brightnessToAdd)
        Adds the specified amount to the specified HSB (Hue, Saturation, Brightness) parameter of the given color. The amount can be negative.
        Parameters:
        baseColor - The color to modify
        hueToAdd - The amount of hue to add
        saturationToAdd - The amount of saturation to add
        brightnessToAdd - The amount of brightness to add
        Returns:
        The modified color