private static Color hslIncreaseDecrease( Color color, float amount, int hslIndex, boolean increase ) {
		// convert RGB to HSL
		float[] hsl = HSLColor.fromRGB( color );
		float alpha = color.getAlpha() / 255f;

		// apply HSL color change
		float amount2 = increase ? amount : -amount;
		if( hslIndex == 0 )
			hsl[0] = (hsl[0] + amount2) % 360;
		else
			hsl[hslIndex] = clamp( hsl[hslIndex] + (amount2 * 100) );

		// convert HSL to RGB
		return HSLColor.toRGB( hsl[0], hsl[1], hsl[2], alpha );
	}
Rotate the hue angle (0-360) of a color in HSL color space in either direction.

@param color base color
@param angle the number of degrees to rotate (in range -360 - 360)
@return new color
@since 2
flatlaf-core/src/main/java/com/formdev/flatlaf/util/ColorFunctions.java