code: public void setG(final int g) {
          if (g < 0 || g > 255) {
              throw new InvalidValueException(
                      "g paramater accept values only from 0 to 255.");
          }
          this.g = g;
          rgba = "rgba(" + r + ", " + g + ", " + b + ", " + a + ")";
          if (getStateChangeInformer() != null) {
              getStateChangeInformer().stateChanged(this);
          }
      }
docs: to set the green value which is in between 0 to 255.
  
  @param g
  represents green
  @author WFF
  @since 1.0.0