/** * Creates a new hue-shifted color scheme. * * @param origScheme * The original color scheme. * @param hueShiftFactor * Shift factor. Should be in -1.0-1.0 range. */ public HueShiftColorScheme(SubstanceColorScheme origScheme, double hueShiftFactor) { super("Hue-shift " + origScheme.getDisplayName() + " " + (int) (100 * hueShiftFactor) + "%", getResolver(origScheme)); this.hueShiftFactor = hueShiftFactor; this.origScheme = origScheme; this.foregroundColor = SubstanceColorUtilities.getHueShiftedColor( origScheme.getForegroundColor(), this.hueShiftFactor / 2.0); this.mainUltraDarkColor = SubstanceColorUtilities.getHueShiftedColor( origScheme.getUltraDarkColor(), this.hueShiftFactor); this.mainDarkColor = SubstanceColorUtilities.getHueShiftedColor( origScheme.getDarkColor(), this.hueShiftFactor); this.mainMidColor = SubstanceColorUtilities.getHueShiftedColor( origScheme.getMidColor(), this.hueShiftFactor); this.mainLightColor = SubstanceColorUtilities.getHueShiftedColor( origScheme.getLightColor(), this.hueShiftFactor); this.mainExtraLightColor = SubstanceColorUtilities.getHueShiftedColor( origScheme.getExtraLightColor(), this.hueShiftFactor); this.mainUltraLightColor = SubstanceColorUtilities.getHueShiftedColor( origScheme.getUltraLightColor(), this.hueShiftFactor); }
/** * Creates a new hue-shifted color scheme. * * @param origScheme * The original color scheme. * @param hueShiftFactor * Shift factor. Should be in -1.0-1.0 range. */ public HueShiftColorScheme(SubstanceColorScheme origScheme, double hueShiftFactor) { super("Hue-shift " + origScheme.getDisplayName() + " " + (int) (100 * hueShiftFactor) + "%", origScheme.isDark()); this.hueShiftFactor = hueShiftFactor; this.origScheme = origScheme; this.foregroundColor = SubstanceColorUtilities.getHueShiftedColor( origScheme.getForegroundColor(), this.hueShiftFactor / 2.0); this.mainUltraDarkColor = SubstanceColorUtilities.getHueShiftedColor( origScheme.getUltraDarkColor(), this.hueShiftFactor); this.mainDarkColor = SubstanceColorUtilities.getHueShiftedColor( origScheme.getDarkColor(), this.hueShiftFactor); this.mainMidColor = SubstanceColorUtilities.getHueShiftedColor( origScheme.getMidColor(), this.hueShiftFactor); this.mainLightColor = SubstanceColorUtilities.getHueShiftedColor( origScheme.getLightColor(), this.hueShiftFactor); this.mainExtraLightColor = SubstanceColorUtilities.getHueShiftedColor( origScheme.getExtraLightColor(), this.hueShiftFactor); this.mainUltraLightColor = SubstanceColorUtilities.getHueShiftedColor( origScheme.getUltraLightColor(), this.hueShiftFactor); }