/** * Changes this color palette to allow variation in hue and saturation. * @param hueResolution the new resolution to use for the hue component. * @param saturationResolution the new resolution to use for the saturation component. * @param brightnessConstant the new constant value for the brightness component. */ public void setHueSaturationBased(int hueResolution, int saturationResolution, double brightnessConstant) { MathTools.checkGreaterThanOrEquals(hueResolution, 1); MathTools.checkGreaterThanOrEquals(saturationResolution, 1); MathTools.checkIntervalContains(brightnessConstant, 0.0, 1.0); this.hueResolution = hueResolution; this.saturationResolution = saturationResolution; this.brightnessResolution = -1; this.hueConstant = Double.NaN; this.saturationConstant = Double.NaN; this.brightnessConstant = brightnessConstant; updateColorPalette(); }
/** * Changes this color palette to allow variation in hue and saturation. * @param hueResolution the new resolution to use for the hue component. * @param brightnessResolution the new resolution to use for the brightness component. * @param saturationConstant the new constant value for the saturation component. */ public void setHueBrightnessBased(int hueResolution, int brightnessResolution, double saturationConstant) { MathTools.checkGreaterThanOrEquals(hueResolution, 1); MathTools.checkGreaterThanOrEquals(brightnessResolution, 1); MathTools.checkIntervalContains(saturationConstant, 0.0, 1.0); this.hueResolution = hueResolution; this.saturationResolution = -1; this.brightnessResolution = brightnessResolution; this.hueConstant = Double.NaN; this.saturationConstant = saturationConstant; this.brightnessConstant = Double.NaN; updateColorPalette(); }
/** * Changes this color palette to allow variation in hue and saturation. * @param hueResolution the new resolution to use for the hue component. * @param brightnessResolution the new resolution to use for the brightness component. * @param saturationConstant the new constant value for the saturation component. */ public void setHueBrightnessBased(int hueResolution, int brightnessResolution, double saturationConstant) { MathTools.checkIfGreaterOrEqual(hueResolution, 1); MathTools.checkIfGreaterOrEqual(brightnessResolution, 1); MathTools.checkIfInRange(saturationConstant, 0.0, 1.0); this.hueResolution = hueResolution; this.saturationResolution = -1; this.brightnessResolution = brightnessResolution; this.hueConstant = Double.NaN; this.saturationConstant = saturationConstant; this.brightnessConstant = Double.NaN; updateColorPalette(); }
/** * Changes this color palette to allow variation in saturation and brightness. * @param saturationResolution the new resolution to use for the saturation component. * @param brightnessResolution the new resolution to use for the brightness component. * @param hueConstant the new constant value for the hue component. */ public void setSaturationBrightnessBased(int saturationResolution, int brightnessResolution, double hueConstant) { MathTools.checkGreaterThanOrEquals(saturationResolution, 1); MathTools.checkGreaterThanOrEquals(brightnessResolution, 1); MathTools.checkIntervalContains(hueConstant, 0.0, 1.0); this.hueResolution = -1; this.saturationResolution = saturationResolution; this.brightnessResolution = brightnessResolution; this.hueConstant = hueConstant; this.saturationConstant = Double.NaN; this.brightnessConstant = Double.NaN; updateColorPalette(); }
/** * Changes this color palette to allow variation in hue and saturation. * @param hueResolution the new resolution to use for the hue component. * @param saturationResolution the new resolution to use for the saturation component. * @param brightnessConstant the new constant value for the brightness component. */ public void setHueSaturationBased(int hueResolution, int saturationResolution, double brightnessConstant) { MathTools.checkIfGreaterOrEqual(hueResolution, 1); MathTools.checkIfGreaterOrEqual(saturationResolution, 1); MathTools.checkIfInRange(brightnessConstant, 0.0, 1.0); this.hueResolution = hueResolution; this.saturationResolution = saturationResolution; this.brightnessResolution = -1; this.hueConstant = Double.NaN; this.saturationConstant = Double.NaN; this.brightnessConstant = brightnessConstant; updateColorPalette(); }
/** * Changes this color palette to allow variation in saturation and brightness. * @param saturationResolution the new resolution to use for the saturation component. * @param brightnessResolution the new resolution to use for the brightness component. * @param hueConstant the new constant value for the hue component. */ public void setSaturationBrightnessBased(int saturationResolution, int brightnessResolution, double hueConstant) { MathTools.checkIfGreaterOrEqual(saturationResolution, 1); MathTools.checkIfGreaterOrEqual(brightnessResolution, 1); MathTools.checkIfInRange(hueConstant, 0.0, 1.0); this.hueResolution = -1; this.saturationResolution = saturationResolution; this.brightnessResolution = brightnessResolution; this.hueConstant = hueConstant; this.saturationConstant = Double.NaN; this.brightnessConstant = Double.NaN; updateColorPalette(); }