package rainbowPackage;

//import javafx.scene.paint.Paint.*;
import javafx.scene.paint.Color;

public class RainbowSoftColor //For All Rainbows To Be Defined Using Multiple ColorSlider.java Classes Involving Rainbow Color And Color Sequences In This Class; RainbowSoftColor.java
{
	ColorSlider black = new ColorSlider( new double[]{0,0,0} );
	ColorSlider white = new ColorSlider( new double[]{255,255,255} );

	ColorSlider color = black;
	ColorSlider tempColor = white;

	TransparencySlider colorTransparency = new TransparencySlider( new double[]{0,0,0,1} );
	TransparencySlider tempColorTransparency = new TransparencySlider( new double[]{255,255,255,1} );

	ColorSlider customColors[] = new ColorSlider[] { new ColorSlider( new double[]{0,0,0} ), new ColorSlider( new double[]{255,255,255} ) };
	TransparencySlider customTransparencyColors[] = new TransparencySlider[] { new TransparencySlider( new double[]{0,0,0,1} ), new TransparencySlider( new double[]{255,255,255,1} ) };

	ColorSlider skyblue = new ColorSlider( new double[]{134,206,249} );
	ColorSlider oxylblue = new ColorSlider( new double[]{0,255,255} );
	ColorSlider pink = new ColorSlider( new double[]{255,64,143} );
	ColorSlider blue = new ColorSlider( new double[]{0,0,192} );
	ColorSlider red = new ColorSlider( new double[]{193,0,0} );
	ColorSlider purple = new ColorSlider( new double[]{122,0,178} );
	ColorSlider orange = new ColorSlider( new double[]{255,134,0} );
	ColorSlider green = new ColorSlider( new double[]{0,133,50} );
	ColorSlider yellow = new ColorSlider( new double[]{246,252,15} );
	ColorSlider teal = new ColorSlider( new double[]{3,224,149} );
	ColorSlider bronze = new ColorSlider( new double[]{152,123,46} );
	ColorSlider silver = new ColorSlider( new double[]{193,192,192} );
	ColorSlider gold = new ColorSlider( new double[]{205,191,44} );
	ColorSlider lime = new ColorSlider( new double[]{126,193,33} );
	ColorSlider brown = new ColorSlider( new double[]{131,103,71} );
	ColorSlider oxylBlue0FF = new ColorSlider( new double[]{0,255,255} );

	public double[] rgb = {0,0,0};// = {0,0,0};
	public double[] argb = {0,0,0,1};// = {0,0,0};
	public Color fxColor;
	public double ColorBeingChecked = 0, OpacityBeingChecked = 1, rainbowInterval = 1, rainbowEndsEachLengthOfExtrema = 1, rainbowLengthWOextrema = 1, rainbowAdjustedColorInterval = 1;//, ColorToBeChecked = 0;
	//ColorValueFit colorValueFit = new ColorValueFit(0.);

	public RainbowSoftColor()//1st Square DiagnosticsClass.java
	{
		rgb = new double[]{0,0,0};
		argb = new double[]{0,0,0,1};
		//color.rgb = rgb;
		color = new ColorSlider( rgb );
		colorTransparency = new TransparencySlider( argb );
		fxColor = color.ToFXColor();
	}
	public RainbowSoftColor( Color FXColor )//2nd Square DiagnosticsClass.java
	{
		fxColor = FXColor;
		//color.rgb = rgb;
		rgb = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255 };
		argb = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255, FXColor.getOpacity() };
		color = new ColorSlider( rgb );
		colorTransparency = new TransparencySlider( argb );
	}
	public RainbowSoftColor( double[] ARGB )//3rd Square DiagnosticsClass.java
	{
		argb = ARGB;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(argb[z]);
			argb[z] = ColorValueFitter(argb[z]);
		}
		if ( argb.length == 3 )
			argb = new double[] { argb[0], argb[1], argb[2], 1 };
		else
			argb[3] = OpacityValueFitter(argb[3]);
		//color.rgb = rgb;
		color = new ColorSlider( rgb );
		colorTransparency = new TransparencySlider( argb );
		fxColor = color.ToFXColor();
	}
	public Object RainbowSoftColorRainbowFunction(double RainbowLength, double CoreVariable)//4th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / 6;
		if ( CoreVariable < 0 )
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, red);
		else if ( CoreVariable < rainbowInterval)
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, orange);
		else if ( CoreVariable < 2 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval, orange, yellow);
		else if ( CoreVariable < 3 * rainbowInterval )		
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, yellow, green);
		else if ( CoreVariable < 4 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, green, teal);
		else if ( CoreVariable < 5 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, teal, blue);
		else if ( CoreVariable < 6 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, blue, purple);
		else
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, purple);
		rgb = color.rgb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(rgb[z]);
			argb[z] = ColorValueFitter(rgb[z]);
		}
		argb[3] = 1;
		colorTransparency = new TransparencySlider( argb );
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( color.rgb );
	}
	public Object RainbowSoftColorRainbowFunctionReverse(double RainbowLength, double CoreVariable)//7th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / 6;
		if ( CoreVariable < 0 )
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, purple);
		else if ( CoreVariable < rainbowInterval)
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, blue);
		else if ( CoreVariable < 2 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval, blue, teal);
		else if ( CoreVariable < 3 * rainbowInterval )		
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, teal, pink);
		else if ( CoreVariable < 4 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, pink, yellow);
		else if ( CoreVariable < 5 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, yellow, orange);
		else if ( CoreVariable < 6 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, orange, red);
		else
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, red);
		rgb = color.rgb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(rgb[z]);
			argb[z] = ColorValueFitter(rgb[z]);
		}
		argb[3] = 1;
		colorTransparency = new TransparencySlider( argb );
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( color.rgb );
	}
	public Object RainbowSoftColorFunction(double SliderInterval, double Loc, RainbowSoftColor ColorBefore, RainbowSoftColor ColorAfter)//With -Loc, Loc>SliderInterval Fix Not Found In Basil Slider Classes //5th Square DiagnosticsClass.java
	{
		if ( Loc < 0 )
			for (int z = 0; z <= 2; z++)
			{
				rgb[z] = ColorValueFitter( ColorBefore.rgb[z] );
				argb[z] = ColorValueFitter( rgb[z] );
			}
		else
			if ( Loc > SliderInterval )
				for (int z = 0; z <= 2; z++)
				{
					rgb[z] = ColorValueFitter( ColorAfter.rgb[z] );
					argb[z] = ColorValueFitter( rgb[z] );
				}
			else
				for (int z = 0; z <= 2; z++)
				{
					rgb[z] = ColorValueFitter( ( (ColorAfter.rgb[z] - ColorBefore.rgb[z]) * Loc/SliderInterval + ColorBefore.rgb[z] ) );
					argb[z] = ColorValueFitter( rgb[z] );
				}
		argb[3] = 1;
		//color.rgb = rgb;
		color = new ColorSlider( rgb );
		colorTransparency = new TransparencySlider( argb );
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( rgb );
	}
	public Object RainbowSoftColorFunction(double SliderInterval, double Loc, double BrightnessMultiplyer, int Gradations, RainbowSoftColor ColorBefore, RainbowSoftColor ColorAfter, boolean Adjusted, double OpacityBefore, double OpacityAfter)//With -Loc, Loc>SliderInterval Fix And All Accouchraments //6th Square DiagnosticsClass.java
	{
		if ( Loc < 0 )
		{
			for (int z = 0; z <= 2; z++)
			{
				rgb[z] = ColorValueFitter( ColorBefore.rgb[z] );
				argb[z] = ColorValueFitter( rgb[z] );
			}
			argb[3] = OpacityBefore;
		}
		else
			if ( Loc > SliderInterval )
			{
				for (int z = 0; z <= 2; z++)
				{
					rgb[z] = ColorValueFitter( ColorAfter.rgb[z] );
					argb[z] = ColorValueFitter( rgb[z] );
				}
				argb[3] = OpacityAfter;
			}
			else
				if ( BrightnessMultiplyer < 1)
					for (int z = 0; z <= 2; z++)
						rgb[z] = ( ( (ColorAfter.rgb[z] - ColorBefore.rgb[z]) * Loc/SliderInterval + ColorBefore.rgb[z] ) * BrightnessMultiplyer);
				else
					for (int z = 0; z <= 2; z++)
					{
						rgb[z] = ( ( (ColorAfter.rgb[z] - ColorBefore.rgb[z]) * Loc/SliderInterval + ColorBefore.rgb[z] ) );
						rgb[z] = ( (255 - rgb[z]) / BrightnessMultiplyer + rgb[z] );
					}
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(rgb[z]);
			argb[z] = ColorValueFitter(rgb[z]);
		}
		argb[3] = 1;
		//color.rgb = rgb;
		color = new ColorSlider( rgb );
		colorTransparency = new TransparencySlider( argb );
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( rgb );
	}
	/*public Object RainbowSoftColorRainbowFunction(double RainbowLength, double CoreVariable, double BrightnessMultiplyer)
	{
		if ( CoreVariable < rainbowInterval)
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, orange);
		else if ( CoreVariable < 2 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval, orange, yellow);
		else if ( CoreVariable < 3 * rainbowInterval )		
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, yellow, green);
		else if ( CoreVariable < 4 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, green, teal);
		else if ( CoreVariable < 5 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, teal, blue);
		else
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, blue, purple);
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				rgb[z] = rgb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				rgb[z] = (255 - rgb[z]) / BrightnessMultiplyer + rgb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		rgb = color.rgb;
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( color.rgb );
	}//*/
	public Object RainbowSoftCustomColorFunction(double RainbowLength, double CoreVariable, double[][] RGBcolorArray)//8th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / ( RGBcolorArray.length - 1 );
		customColors = new ColorSlider[RGBcolorArray.length];
		for (int x = 0; x < RGBcolorArray.length; x++)
			//{
			customColors[x] = new ColorSlider( RGBcolorArray[x] );
		/*tempColor = new ColorSlider( RGBcolorArray[x] );
			tempColor.set( RGBcolorArray[x] );
			customColors[x] = tempColor;
		//}// */
		if ( CoreVariable < 0 )
			color.ColorSliderFunction(rainbowInterval, CoreVariable, customColors[0], customColors[0] );
		else
			if ( CoreVariable <= rainbowInterval * ( customColors.length - 1 ) )
				for (int x = 0; x <= customColors.length - 2; x++)
				{
					if ( CoreVariable >= rainbowInterval * x && CoreVariable < rainbowInterval * ( x + 1 ) )
					{
						color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval * x, customColors[x], customColors[x + 1]);
						break;
					}
				}
			else
				color.ColorSliderFunction(rainbowInterval, CoreVariable, customColors[customColors.length - 1], customColors[customColors.length - 1] );
		rgb = color.rgb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(rgb[z]);
			argb[z] = ColorValueFitter(rgb[z]);
		}
		argb[3] = 1;
		colorTransparency = new TransparencySlider( argb );
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( color.rgb );
	}
	public Object RainbowSoftCustomColorFunction(double RainbowLength, double CoreVariable, Color[] FXcolorArray)//9th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / ( FXcolorArray.length - 1 );
		customColors = new ColorSlider[FXcolorArray.length];
		for (int x = 0; x < FXcolorArray.length; x++)
			customColors[x] = new ColorSlider( FXcolorArray[x] );
		if ( CoreVariable < 0 )
			color.ColorSliderFunction(rainbowInterval, CoreVariable, customColors[0], customColors[0] );
		else
			if ( CoreVariable <= rainbowInterval * ( customColors.length - 1 ) )
				for (int x = 0; x <= customColors.length - 2; x++)
				{
					if ( CoreVariable >= rainbowInterval * x && CoreVariable < rainbowInterval * ( x + 1 ) )
					{
						color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval * x, customColors[x], customColors[x + 1]);
						break;
					}
				}
			else
				color.ColorSliderFunction(rainbowInterval, CoreVariable, customColors[customColors.length - 1], customColors[customColors.length - 1] );
		rgb = color.rgb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(rgb[z]);
			argb[z] = ColorValueFitter(rgb[z]);
		}
		argb[3] = 1;
		colorTransparency = new TransparencySlider( argb );
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( color.rgb );
	}
	/*public Object RainbowSoftColorRainbowFunctionReverse(double RainbowLength, double CoreVariable, double BrightnessMultiplyer)
	{
		if ( CoreVariable < ( rainbowInterval / ( 2 + Gradations) ) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, purple);
		else if ( CoreVariable < rainbowInterval)
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, blue, Gradations);
		else if ( CoreVariable < ( 2 * rainbowInterval) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval, blue, teal, Gradations);
		else if ( CoreVariable < ( 3 * rainbowInterval) )		
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, teal, pink, Gradations);
		else if ( CoreVariable < ( 4 * rainbowInterval) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, pink, yellow, Gradations);
		else if ( CoreVariable < ( 5 * rainbowInterval) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, yellow, orange, Gradations);
		else if ( CoreVariable < 6 * rainbowInterval - rainbowInterval / ( 2 + Gradations) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, orange, red, Gradations);
		else
			color.ColorSliderFunction(RainbowLength, CoreVariable, red, red);
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				rgb[z] = rgb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				rgb[z] = (255 - rgb[z]) / BrightnessMultiplyer + rgb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		rgb = color.rgb;
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( color.rgb );
	}//*/
	/*public Object RainbowSoftColorRainbowFunctionUnAdjustedGradations(double RainbowLength, double CoreVariable, int Gradations)
	{
		if ( CoreVariable < ( rainbowInterval / ( 2 + Gradations) ) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, red);
		else if ( CoreVariable < rainbowInterval)
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, orange, Gradations);
		else if ( CoreVariable < 2 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval, orange, yellow, Gradations);
		else if ( CoreVariable < 3 * rainbowInterval )		
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, yellow, green, Gradations);
		else if ( CoreVariable < 4 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, green, teal, Gradations);
		else if ( CoreVariable < 5 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, teal, blue, Gradations);
		else if ( CoreVariable < 6 * rainbowInterval - rainbowInterval / ( 2 + Gradations) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, blue, purple, Gradations);
		else
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, purple);
		rgb = color.rgb;
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( rgb );
	}*/
	public Object RainbowSoftColorRainbowFunctionUnAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations)//10th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / 6;
		if ( CoreVariable < ( rainbowInterval / ( 2 + Gradations) ) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, red);
		else if ( CoreVariable < rainbowInterval)
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, orange, Gradations);
		else if ( CoreVariable < 2 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval, orange, yellow, Gradations);
		else if ( CoreVariable < 3 * rainbowInterval )		
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, yellow, green, Gradations);
		else if ( CoreVariable < 4 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, green, teal, Gradations);
		else if ( CoreVariable < 5 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, teal, blue, Gradations);
		else if ( CoreVariable < 6 * rainbowInterval - rainbowInterval / ( 2 + Gradations) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, blue, purple, Gradations);
		else
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, purple);
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				color.rgb[z] = color.rgb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				color.rgb[z] = (255 - color.rgb[z]) / BrightnessMultiplyer + color.rgb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		rgb = color.rgb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(rgb[z]);
			argb[z] = ColorValueFitter(rgb[z]);
		}
		argb[3] = 1;
		colorTransparency = new TransparencySlider( argb );
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( color.rgb );
	}
	/*public Object RainbowSoftColorRainbowFunctionReverseUnAdjustedGradations(double RainbowLength, double CoreVariable, int Gradations)
	{
		if ( CoreVariable < ( rainbowInterval / ( 2 + Gradations) ) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, purple);
		else if ( CoreVariable < rainbowInterval)
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, blue, Gradations);
		else if ( CoreVariable < ( 2 * rainbowInterval) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval, blue, teal, Gradations);
		else if ( CoreVariable < ( 3 * rainbowInterval) )		
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, teal, pink, Gradations);
		else if ( CoreVariable < ( 4 * rainbowInterval) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, pink, yellow, Gradations);
		else if ( CoreVariable < ( 5 * rainbowInterval) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, yellow, orange, Gradations);
		else if ( CoreVariable < 6 * rainbowInterval - rainbowInterval / ( 2 + Gradations) )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, orange, red, Gradations);
		else
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, red);
		rgb = color.rgb;
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( rgb );
	}//*/
	public Object RainbowSoftColorRainbowFunctionReverseUnAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations)//11th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / 6;
		if ( CoreVariable < 0 )
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, purple);
		else if ( CoreVariable < rainbowInterval)
			color.ColorSliderFunction(rainbowInterval, CoreVariable, purple, blue);
		else if ( CoreVariable < 2 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval, blue, teal);
		else if ( CoreVariable < 3 * rainbowInterval )		
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, teal, pink);
		else if ( CoreVariable < 4 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, pink, yellow);
		else if ( CoreVariable < 5 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, yellow, orange);
		else if ( CoreVariable < 6 * rainbowInterval )
			color.ColorSliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, orange, red);
		else
			color.ColorSliderFunction(rainbowInterval, CoreVariable, red, red);
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				color.rgb[z] = color.rgb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				color.rgb[z] = (255 - color.rgb[z]) / BrightnessMultiplyer + color.rgb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		rgb = color.rgb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(rgb[z]);
			argb[z] = ColorValueFitter(rgb[z]);
		}
		argb[3] = 1;
		colorTransparency = new TransparencySlider( argb );
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( color.rgb );
	}
	public Object RainbowSoftColorRainbowFunctionAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations)//12th Square DiagnosticsClass.java
	{//CHANGE IN ALL
		rainbowInterval = RainbowLength / 6;
		rainbowEndsEachLengthOfExtrema = rainbowInterval / ( 2 + Gradations );
		rainbowLengthWOextrema = RainbowLength - 2 * rainbowEndsEachLengthOfExtrema;
		rainbowAdjustedColorInterval = rainbowLengthWOextrema / 6;
		if ( CoreVariable < rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, red, red );
		else if ( CoreVariable < rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - rainbowEndsEachLengthOfExtrema, Gradations, red, orange );
		else if ( CoreVariable < 2 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, orange, yellow );
		else if ( CoreVariable < 3 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - 2 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, yellow, green );
		else if ( CoreVariable < 4 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - 3 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, green, teal );
		else if ( CoreVariable < 5 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - 4 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, teal, blue );
		else if ( CoreVariable < 6 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - 5 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, blue, purple );
		else
			color.ColorSliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable - 6 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, purple, purple );
		//colorTransparency.TransparencySliderFunction( (double)( rainbowLength ), (double)(CoreVariable), (double)(1), (int)( Gradations ) /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing */, new TransparencySlider(green.rgb), new TransparencySlider(teal.rgb), (double)(1), (double)(0) );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				color.rgb[z] = color.rgb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				color.rgb[z] = (255 - color.rgb[z]) / BrightnessMultiplyer + color.rgb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		rgb = color.rgb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(rgb[z]);
			argb[z] = ColorValueFitter(rgb[z]);
		}
		argb[3] = 1;
		colorTransparency = new TransparencySlider( argb );
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( color.rgb );//colorTransparency.argb );
	}
	public Object RainbowSoftColorRainbowFunctionReverseAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations)//13th Square DiagnosticsClass.java
	{//CHANGE IN ALL
		rainbowInterval = RainbowLength / 6;
		rainbowEndsEachLengthOfExtrema = rainbowInterval / ( 2 + Gradations );
		rainbowLengthWOextrema = RainbowLength - 2 * rainbowEndsEachLengthOfExtrema;
		rainbowAdjustedColorInterval = rainbowLengthWOextrema / 6;// / ( ( Gradations + 1 ) * 6 - 2 * Gradations ) ;
		if ( CoreVariable < rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, purple, purple );
		else if ( CoreVariable < rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - rainbowEndsEachLengthOfExtrema, Gradations, purple, blue );
		else if ( CoreVariable < 2 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, blue, teal );
		else if ( CoreVariable < 3 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - 2 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, teal, pink );
		else if ( CoreVariable < 4 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - 3 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, pink, yellow );
		else if ( CoreVariable < 5 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - 4 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, yellow, orange );
		else if ( CoreVariable < 6 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - 5 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, orange, red );
		else
			color.ColorSliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable - 6 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, red, red );
		//colorTransparency.TransparencySliderFunction( (double)( rainbowLength ), (double)(CoreVariable), (double)(1), (int)( Gradations ) /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing */, new TransparencySlider(green.rgb), new TransparencySlider(teal.rgb), (double)(1), (double)(0) );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				color.rgb[z] = color.rgb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				color.rgb[z] = (255 - color.rgb[z]) / BrightnessMultiplyer + color.rgb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		rgb = color.rgb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(color.rgb[z]);
			argb[z] = ColorValueFitter(rgb[z]);
		}
		argb[3] = 1;
		colorTransparency = new TransparencySlider( argb );
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( color.rgb );//colorTransparency.argb );
	}
	public Object RainbowSoftColorRainbowTransparencyFunctionUnAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter)//14th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / 6;
		if ( CoreVariable < rainbowInterval)
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable, BrightnessMultiplyer, Gradations, new TransparencySlider (red.rgb), new TransparencySlider (orange.rgb), OpacityBefore, ( OpacityAfter - OpacityBefore ) * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 2 * rainbowInterval) )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (orange.rgb), new TransparencySlider (yellow.rgb), ( OpacityAfter - OpacityBefore ) * rainbowInterval / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * 2 * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 3 * rainbowInterval) )		
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (yellow.rgb), new TransparencySlider (green.rgb), ( OpacityAfter - OpacityBefore ) * 2 * rainbowInterval / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * 3 * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 4 * rainbowInterval) )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (green.rgb), new TransparencySlider (teal.rgb), ( OpacityAfter - OpacityBefore ) * 3 * rainbowInterval / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * 4 * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 5 * rainbowInterval) )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (teal.rgb), new TransparencySlider (blue.rgb), ( OpacityAfter - OpacityBefore ) * 4 * rainbowInterval / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * 5 * rainbowInterval / RainbowLength + OpacityBefore );
		else
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (blue.rgb), new TransparencySlider (purple.rgb), ( OpacityAfter - OpacityBefore ) * 5 * rainbowInterval / RainbowLength + OpacityBefore, OpacityAfter );
		//colorTransparency.TransparencySliderFunction( (double)( rainbowLength ), (double)(CoreVariable), (double)(1), (int)( Gradations ) /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing */, new TransparencySlider(green.rgb), new TransparencySlider(teal.rgb), (double)(1), (double)(0) );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.argb[z] = colorTransparency.argb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				colorTransparency.argb[z] = (255 - colorTransparency.argb[z]) / BrightnessMultiplyer + colorTransparency.argb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		argb = colorTransparency.argb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(argb[z]);
			argb[z] = ColorValueFitter(argb[z]);
		}
		argb[3] = OpacityValueFitter(argb[3]);
		color = new ColorSlider ( colorTransparency.ToFXColor() );
		fxColor = colorTransparency.ToFXColor();
		return new RainbowSoftColor( colorTransparency.argb );//colorTransparency.argb );
	}
	public Object RainbowSoftColorRainbowTransparencyFunctionReverseUnAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter)//15th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / 6;
		if ( CoreVariable < 0 )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable, BrightnessMultiplyer, Gradations, new TransparencySlider (purple.rgb), new TransparencySlider (purple.rgb), OpacityBefore, OpacityBefore );
		else if ( CoreVariable < rainbowInterval )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable, BrightnessMultiplyer, Gradations, new TransparencySlider (purple.rgb), new TransparencySlider (blue.rgb), OpacityBefore, ( OpacityAfter - OpacityBefore ) * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 2 * rainbowInterval) )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (blue.rgb), new TransparencySlider (teal.rgb), ( OpacityAfter - OpacityBefore ) * rainbowInterval / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * 2 * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 3 * rainbowInterval) )		
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 2 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (teal.rgb), new TransparencySlider (pink.rgb), ( OpacityAfter - OpacityBefore ) * 2 * rainbowInterval / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * 3 * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 4 * rainbowInterval) )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 3 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (pink.rgb), new TransparencySlider (yellow.rgb), ( OpacityAfter - OpacityBefore ) * 3 * rainbowInterval / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * 4 * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 5 * rainbowInterval) )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 4 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (yellow.rgb), new TransparencySlider (orange.rgb), ( OpacityAfter - OpacityBefore ) * 4 * rainbowInterval / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * 5 * rainbowInterval / RainbowLength + OpacityBefore );
		else if ( CoreVariable < ( 6 * rainbowInterval) )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 5 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (orange.rgb), new TransparencySlider (red.rgb), ( OpacityAfter - OpacityBefore ) * 5 * rainbowInterval / RainbowLength + OpacityBefore, OpacityAfter );
		else
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - 6 * rainbowInterval, BrightnessMultiplyer, Gradations, new TransparencySlider (red.rgb), new TransparencySlider (red.rgb), OpacityAfter, OpacityAfter );
		//colorTransparency.TransparencySliderFunction( (double)( rainbowLength ), (double)(CoreVariable), (double)(1), (int)( Gradations ) /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing */, new TransparencySlider(green.rgb), new TransparencySlider(teal.rgb), (double)(1), (double)(0) );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.argb[z] = colorTransparency.argb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				colorTransparency.argb[z] = (255 - colorTransparency.argb[z]) / BrightnessMultiplyer + colorTransparency.argb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		argb = colorTransparency.argb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(argb[z]);
			argb[z] = ColorValueFitter(argb[z]);
		}
		argb[3] = OpacityValueFitter(argb[3]);
		color = new ColorSlider ( colorTransparency.ToFXColor() );
		fxColor = colorTransparency.ToFXColor();
		return new RainbowSoftColor( colorTransparency.argb );//colorTransparency.argb );
	}
	public Object RainbowSoftCustomColorFunctionUnAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, double[][] RGBcolorArray)//16th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / ( RGBcolorArray.length - 1 );
		customColors = new ColorSlider[RGBcolorArray.length];
		for (int x = 0; x < RGBcolorArray.length; x++)
			customColors[x] = new ColorSlider( RGBcolorArray[x] );
		if ( CoreVariable < 0 )
			color.ColorSliderFunction(rainbowInterval, CoreVariable, customColors[0], customColors[0], Gradations );
		else
			if ( CoreVariable <= rainbowInterval * ( customColors.length - 1 ) )
				for (int x = 0; x <= customColors.length - 2; x++)
				{
					if ( CoreVariable >= rainbowInterval * x && CoreVariable < rainbowInterval * ( x + 1 ) )
					{
						color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval * x, customColors[x], customColors[x + 1], Gradations);
						break;
					}
				}
			else
				color.ColorSliderFunction(rainbowInterval, CoreVariable, customColors[customColors.length - 1], customColors[customColors.length - 1], Gradations );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				color.rgb[z] = color.rgb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				color.rgb[z] = (255 - color.rgb[z]) / BrightnessMultiplyer + color.rgb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		rgb = color.rgb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(rgb[z]);
			argb[z] = ColorValueFitter(rgb[z]);
		}
		argb[3] = 1;
		colorTransparency = new TransparencySlider( argb );
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( color.rgb );
	}
	public Object RainbowSoftCustomColorFunctionUnAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, Color[] FXcolorArray)//17th Square DiagnosticsClass.java
	{
		//System.out.println( "Function FXcolors Brightnesses" + FXcolorArray[0].getBrightness() + FXcolorArray[1].getBrightness() + FXcolorArray[2].getBrightness() + FXcolorArray[3].getBrightness() + FXcolorArray[4].getBrightness() + FXcolorArray[5].getBrightness() );
		//System.out.println("FXcolorArray.length = " + FXcolorArray.length);
		rainbowInterval = RainbowLength / ( FXcolorArray.length - 1 );
		customColors = new ColorSlider[FXcolorArray.length];
		for (int x = 0; x < FXcolorArray.length; x++)
			customColors[x] = new ColorSlider( FXcolorArray[x] );
		//System.out.println( "customColors[x] R: " + customColors[0].fxColor.getRed() + " G: " + customColors[0].fxColor.getGreen() + " B: " + customColors[0].fxColor.getBlue() +" Brightneess:" + customColors[2].fxColor.getBrightness() + customColors[3].fxColor.getBrightness() + customColors[4].fxColor.getBrightness() + customColors[5].fxColor.getBrightness() );
		if ( CoreVariable < 0 )
			color.ColorSliderFunction(rainbowInterval, CoreVariable, customColors[0], customColors[0], Gradations );
		else
			if ( CoreVariable <= rainbowInterval * ( customColors.length - 1 ) )
				for (int x = 0; x <= customColors.length - 2; x++)
				{
					if ( CoreVariable >= rainbowInterval * x && CoreVariable < rainbowInterval * ( x + 1 ) )
					{
						color.ColorSliderFunction(rainbowInterval, CoreVariable - rainbowInterval * x, customColors[x], customColors[x + 1], Gradations);
						break;
					}
				}
			else
				color.ColorSliderFunction(rainbowInterval, CoreVariable, customColors[customColors.length - 1], customColors[customColors.length - 1], Gradations );
		//System.out.println( "color.rgb = R: " + color.rgb[0] + " G: " + color.rgb[1] + " B: " + color.rgb[2] );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				color.rgb[z] = color.rgb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				color.rgb[z] = (255 - color.rgb[z]) / BrightnessMultiplyer + color.rgb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		//System.out.println( "color.rgb = R: " + color.rgb[0] + " G: " + color.rgb[1] + " B: " + color.rgb[2] );
		rgb = color.rgb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(rgb[z]);
			argb[z] = ColorValueFitter(rgb[z]);
		}
		argb[3] = 1;
		colorTransparency = new TransparencySlider( argb );
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( color.rgb );
	}
	public Object RainbowSoftCustomColorFunctionAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, double[][] RGBcolorArray)//18th Square DiagnosticsClass.java
	{
		customColors = new ColorSlider[RGBcolorArray.length];
		rainbowInterval = RainbowLength / ( RGBcolorArray.length - 1 );
		rainbowEndsEachLengthOfExtrema = rainbowInterval / ( 2 + Gradations );
		rainbowLengthWOextrema = RainbowLength - 2 * rainbowEndsEachLengthOfExtrema;
		rainbowAdjustedColorInterval = rainbowLengthWOextrema / ( RGBcolorArray.length - 1 );// / ( ( Gradations + 1 ) * 6 - 2 * Gradations ) ;
		for (int x = 0; x < RGBcolorArray.length; x++)
			customColors[x] = new ColorSlider( RGBcolorArray[x] );
		if ( CoreVariable < rainbowEndsEachLengthOfExtrema )
			color = customColors[0];
		else
			if ( CoreVariable <= ( customColors.length - 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			{
				for (int x = 0; x <= customColors.length - 2; x++)
				{
					if ( CoreVariable >= x * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema && CoreVariable < ( x + 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
					{
						color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - x * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, 1, customColors[x], customColors[x + 1], Gradations );
						break;
					}
				}
			}
			else
				color = customColors[customColors.length - 1];
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				color.rgb[z] = color.rgb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				color.rgb[z] = (255 - color.rgb[z]) / BrightnessMultiplyer + color.rgb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		rgb = color.rgb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(rgb[z]);
			argb[z] = ColorValueFitter(rgb[z]);
		}
		argb[3] = OpacityValueFitter( 1 );
		color = new ColorSlider ( color.ToFXColor() );
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( color.rgb );
	}
	public Object RainbowSoftCustomColorFunctionAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, Color[] FXcolorArray)//19th Square DiagnosticsClass.java
	{
		customColors = new ColorSlider[FXcolorArray.length];
		rainbowInterval = RainbowLength / ( FXcolorArray.length - 1 );
		rainbowEndsEachLengthOfExtrema = rainbowInterval / ( 2 + Gradations );
		rainbowLengthWOextrema = RainbowLength - 2 * rainbowEndsEachLengthOfExtrema;
		rainbowAdjustedColorInterval = rainbowLengthWOextrema / ( FXcolorArray.length - 1 );// / ( ( Gradations + 1 ) * 6 - 2 * Gradations ) ;
		for (int x = 0; x < FXcolorArray.length; x++)
			customColors[x] = new ColorSlider( FXcolorArray[x] );
		if ( CoreVariable < rainbowEndsEachLengthOfExtrema )
			color = customColors[0];
		else
			if ( CoreVariable <= ( customColors.length - 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			{
				for (int x = 0; x <= customColors.length - 2; x++)
				{
					if ( CoreVariable >= x * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema && CoreVariable < ( x + 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
					{
						color.ColorSliderFunction( rainbowAdjustedColorInterval, CoreVariable - x * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, 1, customColors[x], customColors[x + 1], Gradations );
						break;
					}
				}
			}
			else
				color = customColors[customColors.length - 1];
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				color.rgb[z] = color.rgb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				color.rgb[z] = (255 - color.rgb[z]) / BrightnessMultiplyer + color.rgb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		rgb = color.rgb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(rgb[z]);
			argb[z] = ColorValueFitter(rgb[z]);
		}
		argb[3] = OpacityValueFitter( 1 );
		color = new ColorSlider ( color.ToFXColor() );
		fxColor = color.ToFXColor();
		return new RainbowSoftColor( color.rgb );
	}
	public Object RainbowSoftCustomColorTransparencyFunctionUnAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, double[][] ARGBcolorArray, double OpacityBefore, double OpacityAfter)//20th Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / ( ARGBcolorArray.length - 1 );
		customTransparencyColors = new TransparencySlider[ARGBcolorArray.length];
		for (int x = 0; x < ARGBcolorArray.length; x++)
			customTransparencyColors[x] = new TransparencySlider( ARGBcolorArray[x] );
		if ( CoreVariable < 0 )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable, Gradations, customTransparencyColors[0], customTransparencyColors[0], OpacityBefore, OpacityBefore );
		else
			if ( CoreVariable <= rainbowInterval * ( customTransparencyColors.length - 1 ) )
				for (int x = 0; x <= customTransparencyColors.length - 2; x++)
				{
					if ( CoreVariable >= rainbowInterval * x && CoreVariable < rainbowInterval * ( x + 1 ) )
					{
						colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - rainbowInterval * x, Gradations, customTransparencyColors[x], customTransparencyColors[x + 1], ( OpacityAfter - OpacityBefore ) * ( x * rainbowInterval ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( ( x + 1 ) * rainbowInterval ) / RainbowLength + OpacityBefore );
						break;
					}
				}
			else
				colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable, Gradations, customTransparencyColors[customColors.length - 1], customTransparencyColors[customColors.length - 1], OpacityAfter, OpacityAfter );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.argb[z] = colorTransparency.argb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				colorTransparency.argb[z] = (255 - colorTransparency.argb[z]) / BrightnessMultiplyer + colorTransparency.argb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		argb = colorTransparency.argb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(argb[z]);
			argb[z] = ColorValueFitter(argb[z]);
		}
		argb[3] = OpacityValueFitter(argb[3]);
		color = new ColorSlider ( colorTransparency.ToFXColor() );
		fxColor = colorTransparency.ToFXColor();
		return new RainbowSoftColor( colorTransparency.argb );
	}
	public Object RainbowSoftCustomColorTransparencyFunctionUnAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, Color[] FXcolorArray, double OpacityBefore, double OpacityAfter)//21st Square DiagnosticsClass.java
	{
		rainbowInterval = RainbowLength / ( FXcolorArray.length - 1 );
		customTransparencyColors = new TransparencySlider[FXcolorArray.length];
		for (int x = 0; x < FXcolorArray.length; x++)
			customTransparencyColors[x] = new TransparencySlider( FXcolorArray[x] );
		if ( CoreVariable < 0 )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable, Gradations, customTransparencyColors[0], customTransparencyColors[0], OpacityBefore, OpacityBefore );
		else
			if ( CoreVariable <= rainbowInterval * ( customTransparencyColors.length - 1 ) )
				for (int x = 0; x <= customTransparencyColors.length - 2; x++)
				{
					if ( CoreVariable >= rainbowInterval * x && CoreVariable < rainbowInterval * ( x + 1 ) )
					{
						colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable - rainbowInterval * x, Gradations, customTransparencyColors[x], customTransparencyColors[x + 1], ( OpacityAfter - OpacityBefore ) * ( x * rainbowInterval ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( ( x + 1 ) * rainbowInterval ) / RainbowLength + OpacityBefore );
						break;
					}
				}
			else
				if ( CoreVariable < RainbowLength )
					colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, customTransparencyColors[customTransparencyColors.length - 1], customTransparencyColors[customTransparencyColors.length - 1], ( OpacityAfter - OpacityBefore ) * ( ( customTransparencyColors.length - 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore,  OpacityAfter );
				else
					colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, customTransparencyColors[customTransparencyColors.length - 1], customTransparencyColors[customTransparencyColors.length - 1], OpacityAfter, OpacityAfter );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.argb[z] = colorTransparency.argb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				colorTransparency.argb[z] = (255 - colorTransparency.argb[z]) / BrightnessMultiplyer + colorTransparency.argb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		argb = colorTransparency.argb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(argb[z]);
			argb[z] = ColorValueFitter(argb[z]);
		}
		argb[3] = OpacityValueFitter(argb[3]);
		color = new ColorSlider ( colorTransparency.ToFXColor() );
		fxColor = colorTransparency.ToFXColor();
		return new RainbowSoftColor( colorTransparency.argb );
	}
	public Object RainbowSoftColorRainbowTransparencyFunctionAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter)//22nd Square DiagnosticsClass.java
	{//CHANGE IN ALL
		rainbowInterval = RainbowLength / 6;
		rainbowEndsEachLengthOfExtrema = rainbowInterval / ( 2 + Gradations );
		rainbowLengthWOextrema = RainbowLength - 2 * rainbowEndsEachLengthOfExtrema;
		rainbowAdjustedColorInterval = rainbowLengthWOextrema / 6;
		if ( CoreVariable < rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, new TransparencySlider (red.rgb), new TransparencySlider (red.rgb), OpacityBefore, ( OpacityAfter - OpacityBefore ) * rainbowEndsEachLengthOfExtrema / RainbowLength + OpacityBefore );
		else if ( CoreVariable < rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (red.rgb), new TransparencySlider (orange.rgb), ( OpacityAfter - OpacityBefore ) * rainbowEndsEachLengthOfExtrema / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 2 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (orange.rgb), new TransparencySlider (yellow.rgb), ( OpacityAfter - OpacityBefore ) * ( rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )/ RainbowLength + OpacityBefore , ( OpacityAfter - OpacityBefore ) * ( 2 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 3 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - 2 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (yellow.rgb), new TransparencySlider (green.rgb), ( OpacityAfter - OpacityBefore ) * ( 2 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( 3 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 4 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - 3 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (green.rgb), new TransparencySlider (teal.rgb),  ( OpacityAfter - OpacityBefore ) * ( 3 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( 4 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 5 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - 4 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (teal.rgb), new TransparencySlider (blue.rgb),  ( OpacityAfter - OpacityBefore ) * ( 4 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( 5 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 6 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - 5 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (blue.rgb), new TransparencySlider (purple.rgb), ( OpacityAfter - OpacityBefore ) * ( 5 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( 6 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else
			colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable - 6 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (purple.rgb), new TransparencySlider (purple.rgb),  OpacityAfter, OpacityAfter );
		//colorTransparency.TransparencySliderFunction( (double)( rainbowLength ), (double)(CoreVariable), (double)(1), (int)( Gradations ) /* ( Math.pow( 10 * xSlider / sliderInterval, 3 ) When Not Testing */, new TransparencySlider(green.rgb), new TransparencySlider(teal.rgb), (double)(1), (double)(0) );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.argb[z] = colorTransparency.argb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				colorTransparency.argb[z] = (255 - colorTransparency.argb[z]) / BrightnessMultiplyer + colorTransparency.argb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(argb[z]);
			argb[z] = ColorValueFitter(argb[z]);
		}
		argb[3] = OpacityValueFitter(argb[3]);
		color = new ColorSlider ( colorTransparency.ToFXColor() );
		fxColor = colorTransparency.ToFXColor();
		return new RainbowSoftColor( colorTransparency.argb );//colorTransparency.argb );
	}
	public Object RainbowSoftColorRainbowTransparencyFunctionReverseAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter)//23rd Square DiagnosticsClass.java
	{//CHANGE IN ALL
		rainbowInterval = RainbowLength / 6;
		rainbowEndsEachLengthOfExtrema = rainbowInterval / ( 2 + Gradations );
		rainbowLengthWOextrema = RainbowLength - 2 * rainbowEndsEachLengthOfExtrema;
		rainbowAdjustedColorInterval = rainbowLengthWOextrema / 6;// / ( ( Gradations + 1 ) * 6 - 2 * Gradations ) ;
		if ( CoreVariable < 0 )
			colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, new TransparencySlider (purple.rgb), new TransparencySlider (purple.rgb), OpacityBefore, OpacityBefore );
		else if ( CoreVariable < rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, new TransparencySlider (purple.rgb), new TransparencySlider (purple.rgb), OpacityBefore, ( OpacityAfter - OpacityBefore ) * rainbowEndsEachLengthOfExtrema / RainbowLength + OpacityBefore );
		else if ( CoreVariable < rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (purple.rgb), new TransparencySlider (blue.rgb), ( OpacityAfter - OpacityBefore ) * rainbowEndsEachLengthOfExtrema / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) + OpacityBefore );
		else if ( CoreVariable < 2 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (blue.rgb), new TransparencySlider (teal.rgb), ( OpacityAfter - OpacityBefore ) * ( rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore , ( OpacityAfter - OpacityBefore ) * ( 2 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 3 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - 2 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (teal.rgb), new TransparencySlider (pink.rgb), ( OpacityAfter - OpacityBefore ) * ( 2 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( 3 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 4 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - 3 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (pink.rgb), new TransparencySlider (yellow.rgb),  ( OpacityAfter - OpacityBefore ) * ( 3 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( 4 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 5 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - 4 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (yellow.rgb), new TransparencySlider (orange.rgb),  ( OpacityAfter - OpacityBefore ) * ( 4 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( 5 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else if ( CoreVariable < 6 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
			colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - 5 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (orange.rgb), new TransparencySlider (red.rgb), ( OpacityAfter - OpacityBefore ) * ( 5 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( 6 * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
		else
			colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable - 6 * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, new TransparencySlider (red.rgb), new TransparencySlider (red.rgb), OpacityAfter, OpacityAfter );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.argb[z] = colorTransparency.argb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				colorTransparency.argb[z] = (255 - colorTransparency.argb[z]) / BrightnessMultiplyer + colorTransparency.argb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(argb[z]);
			argb[z] = ColorValueFitter(argb[z]);
		}
		argb[3] = OpacityValueFitter(argb[3]);
		color = new ColorSlider ( colorTransparency.ToFXColor() );
		fxColor = colorTransparency.ToFXColor();
		return new RainbowSoftColor( colorTransparency.argb );
	}
	public Object RainbowSoftCustomColorTransparencyFunctionAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, double[][] ARGBcolorArray, double OpacityBefore, double OpacityAfter)//24th Square DiagnosticsClass.java
	{
		customTransparencyColors = new TransparencySlider[ARGBcolorArray.length];
		rainbowInterval = RainbowLength / ( ARGBcolorArray.length - 1 );
		rainbowEndsEachLengthOfExtrema = rainbowInterval / ( 2 + Gradations );
		rainbowLengthWOextrema = RainbowLength - 2 * rainbowEndsEachLengthOfExtrema;
		rainbowAdjustedColorInterval = rainbowLengthWOextrema / ( ARGBcolorArray.length - 1 );// / ( ( Gradations + 1 ) * 6 - 2 * Gradations ) ;
		for (int x = 0; x < ARGBcolorArray.length; x++)
			customTransparencyColors[x] = new TransparencySlider( ARGBcolorArray[x] );
		if ( CoreVariable < 0 )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable, Gradations, customTransparencyColors[0], customTransparencyColors[0], OpacityBefore, OpacityBefore );
		else
			if ( CoreVariable < rainbowEndsEachLengthOfExtrema )
				colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, customTransparencyColors[0], customTransparencyColors[0], OpacityBefore, ( OpacityAfter - OpacityBefore ) * rainbowEndsEachLengthOfExtrema / RainbowLength + OpacityBefore );
			else
				if ( CoreVariable <= ( customTransparencyColors.length - 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
					for (int x = 0; x <= customTransparencyColors.length - 2; x++)
					{
						if ( CoreVariable >= x * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema && CoreVariable < ( x + 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
						{
							colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - x * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, customTransparencyColors[x], customTransparencyColors[x + 1], ( OpacityAfter - OpacityBefore ) * ( x * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( ( x + 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
							break;
						}
					}
				else
					if ( CoreVariable < RainbowLength )
						colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, customTransparencyColors[customTransparencyColors.length - 1], customTransparencyColors[customTransparencyColors.length - 1], ( OpacityAfter - OpacityBefore ) * ( ( customTransparencyColors.length - 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore,  OpacityAfter );
					else
						colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, customTransparencyColors[customTransparencyColors.length - 1], customTransparencyColors[customTransparencyColors.length - 1], OpacityAfter, OpacityAfter );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.argb[z] = colorTransparency.argb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				colorTransparency.argb[z] = (255 - colorTransparency.argb[z]) / BrightnessMultiplyer + colorTransparency.argb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		argb = colorTransparency.argb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(argb[z]);
			argb[z] = ColorValueFitter(argb[z]);
		}
		argb[3] = OpacityValueFitter(argb[3]);
		color = new ColorSlider ( colorTransparency.ToFXColor() );
		fxColor = colorTransparency.ToFXColor();
		return new RainbowSoftColor( colorTransparency.argb );
	}
	public Object RainbowSoftCustomColorTransparencyFunctionAdjusted(double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, Color[] FXcolorArray, double OpacityBefore, double OpacityAfter)//25th Square DiagnosticsClass.java
	{
		customTransparencyColors = new TransparencySlider[FXcolorArray.length];
		rainbowInterval = RainbowLength / ( FXcolorArray.length - 1 );
		rainbowEndsEachLengthOfExtrema = rainbowInterval / ( 2 + Gradations );
		rainbowLengthWOextrema = RainbowLength - 2 * rainbowEndsEachLengthOfExtrema;
		rainbowAdjustedColorInterval = rainbowLengthWOextrema / ( FXcolorArray.length - 1 );// / ( ( Gradations + 1 ) * 6 - 2 * Gradations ) ;
		for (int x = 0; x < FXcolorArray.length; x++)
			customTransparencyColors[x] = new TransparencySlider( FXcolorArray[x] );
		if ( CoreVariable < 0 )
			colorTransparency.TransparencySliderFunction(rainbowInterval, CoreVariable, Gradations, customTransparencyColors[0], customTransparencyColors[0], OpacityBefore, OpacityBefore );
		else
			if ( CoreVariable < rainbowEndsEachLengthOfExtrema )
				colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, customTransparencyColors[0], customTransparencyColors[0], OpacityBefore, ( OpacityAfter - OpacityBefore ) * rainbowEndsEachLengthOfExtrema / RainbowLength + OpacityBefore );
			else
				if ( CoreVariable <= ( customTransparencyColors.length - 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
					for (int x = 0; x <= customTransparencyColors.length - 2; x++)
					{
						if ( CoreVariable >= x * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema && CoreVariable < ( x + 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema )
						{
							colorTransparency.TransparencySliderFunction( rainbowAdjustedColorInterval, CoreVariable - x * rainbowAdjustedColorInterval - rainbowEndsEachLengthOfExtrema, Gradations, customTransparencyColors[x], customTransparencyColors[x + 1], ( OpacityAfter - OpacityBefore ) * ( x * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore, ( OpacityAfter - OpacityBefore ) * ( ( x + 1 ) * rainbowAdjustedColorInterval + rainbowEndsEachLengthOfExtrema ) / RainbowLength + OpacityBefore );
							break;
						}
					}
				else
					colorTransparency.TransparencySliderFunction( rainbowEndsEachLengthOfExtrema, CoreVariable, Gradations, customTransparencyColors[customTransparencyColors.length - 1], customTransparencyColors[customTransparencyColors.length - 1], OpacityAfter, OpacityAfter );
		if ( BrightnessMultiplyer <= 1 && BrightnessMultiplyer >= 0 )
			for (int z = 0; z <= 2; z++)
				colorTransparency.argb[z] = colorTransparency.argb[z] * BrightnessMultiplyer;
		else
			for (int z = 0; z <= 2; z++)
			{
				colorTransparency.argb[z] = (255 - colorTransparency.argb[z]) / BrightnessMultiplyer + colorTransparency.argb[z];
			}
		//fxColor = fxColor.rgb( Math.abs( (int)rgb[0] ), Math.abs( (int)rgb[1] ), Math.abs( (int)rgb[2] ) );
		argb = colorTransparency.argb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(argb[z]);
			argb[z] = ColorValueFitter(argb[z]);
		}
		argb[3] = OpacityValueFitter(argb[3]);
		color = new ColorSlider ( colorTransparency.ToFXColor() );
		fxColor = colorTransparency.ToFXColor();
		return new RainbowSoftColor( colorTransparency.argb );
	}
	public Color ToFXColor ()//26th Square DiagnosticsClass.java
	{
		fxColor = color.ToFXColor();
		return fxColor;
	}
	public Color ToFXColor ( double[] ARGB )//27th Square DiagnosticsClass.java
	{
		argb = ARGB;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(argb[z]);
			argb[z] = ColorValueFitter(argb[z]);
		}
		if ( argb.length == 3 )
			argb = new double[] { argb[0], argb[1], argb[2], 1 };
		else
			argb[3] = OpacityValueFitter(argb[3]);
		color = new ColorSlider( rgb );
		colorTransparency = new TransparencySlider ( argb );
		fxColor = color.ToFXColor();
		return fxColor;
	}
	//tempfxColor = tempfxColor.rgb((int)color.rgb[0] , Math.abs( (int)color.rgb[1] ), (int)color.rgb[2]).invert();
	public Boolean ColorTooSimilarFunction(int Color1, int Color2)//28th Square DiagnosticsClass.java
	{
		Boolean TooSimilar = false;
		int color1A = (Color1 >> 24) & 0xff;
		int color1R = (Color1 >> 16) & 0xff;
		int color1G = (Color1 >> 8) & 0xff;
		int color1B = (Color1) & 0xff;
		int color2A = (Color2 >> 24) & 0xff;
		int color2R = (Color2 >> 16) & 0xff;
		int color2G = (Color2 >> 8) & 0xff;
		int color2B = (Color2) & 0xff;
		/*
		int Color1A = Color1 / 16777216;
		int Color1R = ( Color1 - Color1A * 16777216 ) / 65536;
		int Color1G = ( Color1 - Color1A * 16777216 - Color1R * 65536 ) / 256;
		int Color1B = ( Color1 - Color1A * 16777216 - Color1R * 65536 - Color1G * 256);
		int Color2A = Color2 / 16777216;
		int Color2R = ( Color2 - Color2A * 16777216 ) / 65536;
		int Color2G = ( Color2 - Color2A * 16777216 - Color2R * 65536 ) / 256;
		int Color2B = ( Color2 - Color2A * 16777216 - Color2R * 65536 - Color2G * 256);// */
		int colorDifference = Math.abs(Math.abs(color1A) - Math.abs(color2A)) + Math.abs(color1R - color2R) + Math.abs(color1G - color2G) + Math.abs(color1B - color2B);
		if ( colorDifference <= 164 )
			TooSimilar = true;
		else
			TooSimilar = false;
		//System.out.println("colorDifference: " + colorDifference);
		//System.out.println(TooSimilar);
		return TooSimilar;
	}
	public Boolean ColorTooSimilarFunction( Color Color1, Color Color2)//29th Square DiagnosticsClass.java
	{
		Boolean TooSimilar = false;
		int colorDifference = (int)(255 * Math.abs(Math.abs(Color1.getOpacity()) - Math.abs(Color2.getOpacity())) + Math.abs(Color1.getRed() - Color2.getRed()) + Math.abs(Color1.getGreen() - Color2.getGreen()) + Math.abs(Color1.getBlue() - Color2.getBlue()) );
		if ( colorDifference <= 164 )
			TooSimilar = true;
		else
			TooSimilar = false;
		//System.out.println("colorDifference: " + colorDifference);
		//System.out.println(TooSimilar);
		return TooSimilar;
	}
	public Boolean ColorTooSimilarFunction( int Color1, int Color2, double ColorDifference )//3rd Square DiagnosticsClass.java
	{
		Boolean TooSimilar = false;
		int color1A = (Color1 >> 24) & 0xff;
		int color1R = (Color1 >> 16) & 0xff;
		int color1G = (Color1 >> 8) & 0xff;
		int color1B = (Color1) & 0xff;
		int color2A = (Color2 >> 24) & 0xff;
		int color2R = (Color2 >> 16) & 0xff;
		int color2G = (Color2 >> 8) & 0xff;
		int color2B = (Color2) & 0xff;
		int colorDifference = Math.abs(Math.abs(color1A) - Math.abs(color2A)) + Math.abs(Math.abs(color1R) - Math.abs(color2R)) + Math.abs(Math.abs(color1G) - Math.abs(color2G)) + Math.abs(Math.abs(color1B) - Math.abs(color2B));
		if ( colorDifference <= ColorDifference )//200 )
			TooSimilar = true;
		else
			TooSimilar = false;
		//System.out.println("colorDifference: " + colorDifference);
		//System.out.println(TooSimilar);
		return TooSimilar;
	}
	public Boolean ColorTooSimilarFunction( Color Color1, Color Color2, double ColorDifference )//4th Square DiagnosticsClass.java
	{
		Boolean TooSimilar = false;
		int colorDifference = (int)(255 * Math.abs(Math.abs(Color1.getOpacity()) - Math.abs(Color2.getOpacity())) + Math.abs(Math.abs(Color1.getRed()) - Math.abs(Color2.getRed())) + Math.abs(Math.abs(Color1.getGreen()) - Math.abs(Color2.getGreen())) + Math.abs(Math.abs(Color1.getBlue()) - Math.abs(Color2.getBlue())));
		if ( colorDifference <= ColorDifference )//200 )
			TooSimilar = true;
		else
			TooSimilar = false;
		//System.out.println("colorDifference: " + colorDifference);
		//System.out.println(TooSimilar);
		return TooSimilar;
	}
	public double ColorValueFitter ( double ColorToBeChecked )//30th Square DiagnosticsClass.java
	{
		ColorBeingChecked = Math.abs(ColorToBeChecked);
		while ( ColorBeingChecked > 255)
			ColorBeingChecked = ColorBeingChecked - 255;
		return ColorBeingChecked;
	}
	public double OpacityValueFitter ( double OpacityToBeChecked )//31st Square DiagnosticsClass.java
	{
		OpacityBeingChecked = Math.abs(OpacityToBeChecked);
		while ( OpacityBeingChecked > 1)
			OpacityBeingChecked = OpacityBeingChecked - 1;
		return OpacityBeingChecked;
	}

	public Object GlobalRainbowSoftSelectorFunction( double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, boolean Adjusted, double[][] ARGBcolorArray, double OpacityBefore, double OpacityAfter, boolean Reversed, boolean IsColorNum )//Separate RainbowSoftColorGlobalRainbowSoftSelector MultiComponent Diagnostic
	{
		//WORK ON ME EVENTUALLY
		System.out.println( "Use 'RainbowSoftColorRainbowFunction(double RainbowLength, double CoreVariable)' Instead Of GloabalRainbowSoftSelectorFunction! As It Will Be Faster" );
		return new RainbowSoftColor( colorTransparency.argb );
	}
	public Object GlobalRainbowSoftSelectorFunction( double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, boolean Adjusted, Color[] FXcolorArray, double OpacityBefore, double OpacityAfter, boolean Reversed, boolean IsColorNum )//Separate RainbowSoftColorGlobalRainbowSoftSelector MultiComponent Diagnostic
	{
		//WORK ON ME EVENTUALLY
		System.out.println( "Use 'RainbowSoftColorRainbowFunction(double RainbowLength, double CoreVariable)' Instead Of GloabalRainbowSoftSelectorFunction! As It Will Be Faster" );
		return new RainbowSoftColor( colorTransparency.argb );
	}
	public Object GlobalRainbowSoftSelectorFunction( double RainbowLength, double CoreVariable, double BrightnessMultiplyer, int Gradations, boolean Adjusted, double OpacityBefore, double OpacityAfter, boolean Reversed, boolean IsColorNum )//Separate RainbowSoftColorGlobalRainbowSoftSelector MultiComponent Diagnostic
	{
		//WORK ON ME EVENTUALLY
		System.out.println( "Use 'RainbowSoftColorRainbowFunction(double RainbowLength, double CoreVariable)' Instead Of GloabalRainbowSoftSelectorFunction! As It Will Be Faster" );
		return new RainbowSoftColor( colorTransparency.argb );
	}

	public void set(double[] ARGB) { argb = ARGB; for (int z = 0; z <= 2; z++)	{ rgb[z] = argb[z]; } fxColor = fxColor.rgb( (int)(ColorValueFitter(rgb[0])), (int)(ColorValueFitter(rgb[1])), (int)(ColorValueFitter(rgb[2])), OpacityValueFitter(argb[3])); color = new ColorSlider( rgb ); colorTransparency = new TransparencySlider ( argb ); }//32st Square DiagnosticsClass.java
	public void set(Color FXColor) { fxColor = FXColor; rgb = new double[] { fxColor.getRed() * 255, fxColor.getGreen() * 255, fxColor.getBlue() * 255 }; argb = new double[] { fxColor.getRed() * 255, fxColor.getGreen() * 255, fxColor.getBlue() * 255, fxColor.getOpacity() }; color = new ColorSlider( rgb ); colorTransparency = new TransparencySlider ( argb ); }//33nd Square DiagnosticsClass.java
	public Object get() { return argb; }//34th Square DiagnosticsClass.java
	//public Object get() { return fxColor; }
}//*/


/*public class Color(double R, double G, double B)  Color
{
	rgb[0] = R;
	rgb[1] = G;
	rgb[2] = B;
	//return rgb;
}*/
