/** * Changes this color palette to have the brightness component be variable with a given resolution and given the new constant values for the hue and saturation components. * @param brightnessResolution resolution to use for the brightness component. * @param hueConstant the new constant value for the hue component. * @param saturationConstant the new constant value for the saturation component. */ public void setBrightnessBased(int brightnessResolution, double hueConstant, double saturationConstant) { MathTools.checkGreaterThanOrEquals(brightnessResolution, 1); MathTools.checkIntervalContains(saturationConstant, 0.0, 1.0); this.hueResolution = -1; this.saturationResolution = -1; this.brightnessResolution = brightnessResolution; this.hueConstant = hueConstant; this.saturationConstant = saturationConstant; this.brightnessConstant = Double.NaN; updateColorPalette(); }
/** * Changes this color palette to have the saturation component be variable with a given resolution and given the new constant values for the hue and brightness components. * @param saturationResolution resolution to use for the saturation component. * @param hueConstant the new constant value for the hue component. * @param brightnessConstant the new constant value for the brightness component. */ public void setSaturationBased(int saturationResolution, double hueConstant, double brightnessConstant) { MathTools.checkIfGreaterOrEqual(saturationResolution, 1); MathTools.checkIfInRange(brightnessConstant, 0.0, 1.0); this.hueResolution = -1; this.saturationResolution = saturationResolution; this.brightnessResolution = -1; this.hueConstant = hueConstant; this.saturationConstant = brightnessConstant; this.brightnessConstant = Double.NaN; updateColorPalette(); }
/** * Changes this color palette to have the saturation component be variable with a given resolution and given the new constant values for the hue and brightness components. * @param saturationResolution resolution to use for the saturation component. * @param hueConstant the new constant value for the hue component. * @param brightnessConstant the new constant value for the brightness component. */ public void setSaturationBased(int saturationResolution, double hueConstant, double brightnessConstant) { MathTools.checkGreaterThanOrEquals(saturationResolution, 1); MathTools.checkIntervalContains(brightnessConstant, 0.0, 1.0); this.hueResolution = -1; this.saturationResolution = saturationResolution; this.brightnessResolution = -1; this.hueConstant = hueConstant; this.saturationConstant = brightnessConstant; this.brightnessConstant = Double.NaN; updateColorPalette(); }
/** * Changes this color palette to have the brightness component be variable with a given resolution and given the new constant values for the hue and saturation components. * @param brightnessResolution resolution to use for the brightness component. * @param hueConstant the new constant value for the hue component. * @param saturationConstant the new constant value for the saturation component. */ public void setBrightnessBased(int brightnessResolution, double hueConstant, double saturationConstant) { MathTools.checkIfGreaterOrEqual(brightnessResolution, 1); MathTools.checkIfInRange(saturationConstant, 0.0, 1.0); this.hueResolution = -1; this.saturationResolution = -1; this.brightnessResolution = brightnessResolution; this.hueConstant = hueConstant; this.saturationConstant = saturationConstant; this.brightnessConstant = Double.NaN; updateColorPalette(); }
/** * Changes this color palette to have the hue component be variable with a given resolution and given the new constant values for the saturation and brightness components. * @param hueResolution resolution to use for the hue component. * @param saturationConstant the new constant value for the saturation component. * @param brightnessConstant the new constant value for the brightness component. */ public void setHueBased(int hueResolution, double saturationConstant, double brightnessConstant) { MathTools.checkIfGreaterOrEqual(hueResolution, 1); MathTools.checkIfInRange(saturationConstant, 0.0, 1.0); MathTools.checkIfInRange(brightnessConstant, 0.0, 1.0); this.hueResolution = hueResolution; this.saturationResolution = -1; this.brightnessResolution = -1; this.hueConstant = Double.NaN; this.saturationConstant = saturationConstant; this.brightnessConstant = brightnessConstant; updateColorPalette(); }
/** * Changes this color palette to have the hue component be variable with a given resolution and given the new constant values for the saturation and brightness components. * @param hueResolution resolution to use for the hue component. * @param saturationConstant the new constant value for the saturation component. * @param brightnessConstant the new constant value for the brightness component. */ public void setHueBased(int hueResolution, double saturationConstant, double brightnessConstant) { MathTools.checkGreaterThanOrEquals(hueResolution, 1); MathTools.checkIntervalContains(saturationConstant, 0.0, 1.0); MathTools.checkIntervalContains(brightnessConstant, 0.0, 1.0); this.hueResolution = hueResolution; this.saturationResolution = -1; this.brightnessResolution = -1; this.hueConstant = Double.NaN; this.saturationConstant = saturationConstant; this.brightnessConstant = brightnessConstant; updateColorPalette(); }