package rainbowPackage;

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

public final class Diagnostics
{
	public Rectangle2D bounds = new Rectangle2D( 0, 0, 1920, 1080 );
	public ColorTooSimilar colorTooSimilar = new ColorTooSimilar(false);
	int tempColorNum = 0;
	public double[] rgb = {0,0,0};// = {0,0,0};
	public double[] argb = {0,0,0,1};// = {0,0,0};
	public Color fxColor;
	ColorSlider black = new ColorSlider( new double[]{0,0,0} );
	ColorSlider white = new ColorSlider( new double[]{255,255,255} );
	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 neongreen = new ColorSlider( new double[]{0,255,0} );
	ColorSlider oxylblue0FF = new ColorSlider( new double[]{0,255,255} );
	int oxylblue0FFNum = (int)(255 * 16777216) + (int)(0 * 65536) + (int)(255 * 256) + 255;
	TransparencySlider blackT = new TransparencySlider( new double[]{0,0,0} );
	TransparencySlider whiteT = new TransparencySlider( new double[]{255,255,255} );
	TransparencySlider skyblueT = new TransparencySlider( new double[]{134,206,249} );
	TransparencySlider oxylblueT = new TransparencySlider( new double[]{0,255,255} );
	TransparencySlider pinkT = new TransparencySlider( new double[]{255,64,143} );
	TransparencySlider blueT = new TransparencySlider( new double[]{0,0,192} );
	TransparencySlider redT = new TransparencySlider( new double[]{193,0,0} );
	TransparencySlider purpleT = new TransparencySlider( new double[]{122,0,178} );
	TransparencySlider orangeT = new TransparencySlider( new double[]{255,134,0} );
	TransparencySlider greenT = new TransparencySlider( new double[]{0,133,50,.5} );
	TransparencySlider yellowT = new TransparencySlider( new double[]{246,252,15} );
	TransparencySlider tealT = new TransparencySlider( new double[]{3,224,149} );
	TransparencySlider bronzeT = new TransparencySlider( new double[]{152,123,46} );
	TransparencySlider silverT = new TransparencySlider( new double[]{193,192,192} );
	TransparencySlider goldT = new TransparencySlider( new double[]{205,191,44} );
	TransparencySlider limeT = new TransparencySlider( new double[]{126,193,33} );
	TransparencySlider brownT = new TransparencySlider( new double[]{131,103,71} );
	TransparencySlider neongreenT = new TransparencySlider( new double[]{0,255,0} );
	TransparencySlider oxylblue0FFT = new TransparencySlider( new double[]{0,255,255} );

	Color[] imperialFXcolors = new Color[] {green.ToFXColor(), blue.ToFXColor(), purple.ToFXColor(), blue.ToFXColor(), green.ToFXColor()};
	double[][] imperialColorsNum = {green.rgb, blue.rgb, purple.rgb, purple.rgb, blue.rgb, green.rgb};
	Color[] imperialFXcolorsReverse = new Color[] {red.ToFXColor(), orange.ToFXColor(), gold.ToFXColor(), orange.ToFXColor(), red.ToFXColor()};
	double[][] imperialColorsReverseNum = {red.rgb, orange.rgb, gold.rgb, gold.rgb, orange.rgb, red.rgb};
	Color[] doubleBlack = new Color[] { black.ToFXColor(), black.ToFXColor() };

	ColorSlider color = black;//, tempColor = white;
	TransparencySlider colorTransparency = new TransparencySlider( new double[]{0,0,0,1} );
	RainbowSoftColor rainbowSoftColor = new RainbowSoftColor ( new double[]{0,0,0,1} );
	RainbowPattern2D rainbowPattern2D = new RainbowPattern2D ( new double[]{0,0,0,1} );
	boolean tooSimilar= false;
	int xRectangleNum = 0, yRectangleNum = 0;
	public double colorBeingChecked = 0, opacityBeingChecked = 1, xSlid = 0;

	public Diagnostics ( Rectangle2D Bounds )
	{
		bounds = Bounds;
	}
	public Color ToFXColor ()//8th Square BasicDiagnosticsClass.java
	{
		//fxColor = color.ToFXColor();
		//fxColor = Color.rgb( (int)(ColorValueFitter(rgb[0])), (int)(ColorValueFitter(rgb[1])), (int)(ColorValueFitter(rgb[2])) );
		return fxColor;
	}

	public Color ColorTooSimilar( double x, double y, double xSlider )//ADD BOUNDS!!!!!!!!!!!!!!
	{
		int xRectangleQuantity = 3, yRectangleQuantity = 3;

		for ( xRectangleNum = 0; xRectangleNum < xRectangleQuantity; xRectangleNum++ )
			if ( x >= bounds.getMinX() + bounds.getWidth() * xRectangleNum / xRectangleQuantity && x <= bounds.getMinX() + bounds.getWidth() * ( xRectangleNum + 1 ) / xRectangleQuantity )
				break;
		for ( yRectangleNum = 0; yRectangleNum < yRectangleQuantity; yRectangleNum++ )
			if ( y >= bounds.getMinY() + bounds.getHeight() * yRectangleNum / yRectangleQuantity && y <= bounds.getMinY() + bounds.getHeight() * ( yRectangleNum + 1 ) / yRectangleQuantity )
				break;
		xSlid = x - bounds.getMinX() - xRectangleNum * bounds.getWidth() - xSlider / xRectangleQuantity;
		while ( xSlid < 0 )
			xSlid = xSlid + bounds.getWidth() / xRectangleQuantity;
		while ( xSlid > bounds.getWidth() / xRectangleQuantity )
			xSlid = xSlid - bounds.getWidth() / xRectangleQuantity;

		color.ColorSliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, purple.ToFXColor(), oxylblue0FF.ToFXColor() );
		switch ( yRectangleNum )
		{
		case 0:
			switch ( xRectangleNum )
			{
			case 0:
				colorTooSimilar = new ColorTooSimilar ();
				if ( colorTooSimilar.tooSimilar )
					color.set( orange.ToFXColor() );
				else
					color.set( yellow.ToFXColor() );
				//color = new ColorSlider(color.fxColor.invert());
				break;
			case 1:
				colorTooSimilar = new ColorTooSimilar ( true );
				if ( colorTooSimilar.tooSimilar )
					color.set( lime.ToFXColor() );
				else
					color.set( orange.ToFXColor() );
				//color = new ColorSlider(color.fxColor.invert());
				break;
			case 2:
				tempColorNum = (int)((int)( 255 * 16777216) + (int)(color.ToFXColor().getRed() * 255 * 65536) + (int)(color.ToFXColor().getGreen() * 255 * 256) + color.ToFXColor().getBlue() * 255);
				if ( colorTooSimilar.ColorTooSimilarFunction( tempColorNum, oxylblue0FFNum ) )
					color.set( silver.ToFXColor() );
				else
					color.set( neongreen.ToFXColor() );
				//color = new ColorSlider(color.fxColor.invert());
				break;
			}
			break;
		case 1:
			switch ( xRectangleNum )
			{
			case 0:
				if ( colorTooSimilar.ColorTooSimilarFunction( color.ToFXColor(), oxylblue0FF.ToFXColor() ) )
					color.set( green.ToFXColor() );
				//color = new ColorSlider(color.fxColor.invert());
				break;
			case 1:
				colorTooSimilar.set(true);
				if ( colorTooSimilar.tooSimilar )
					color.set( pink.ToFXColor() );
				else
					color.set( orange.ToFXColor() );
				//color = new ColorSlider(color.fxColor.invert());
				break;
			case 2:
				tempColorNum = (int)((int)( 255 * 16777216) + (int)(color.ToFXColor().getRed() * 255 * 65536) + (int)(color.ToFXColor().getGreen() * 255 * 256) + color.ToFXColor().getBlue() * 255);
				if ( colorTooSimilar.ColorTooSimilarFunction( tempColorNum, oxylblue0FFNum, 111 ) )
					color.set( skyblue.ToFXColor() );
				else
					color.set( bronze.ToFXColor() );
				//color = new ColorSlider(color.fxColor.invert());
				break;
			}
			break;
		case 2:
			switch ( xRectangleNum )
			{
			case 0:
				tempColorNum = (int)((int)( 255 * 16777216) + (int)(color.ToFXColor().getRed() * 255 * 65536) + (int)(color.ToFXColor().getGreen() * 255 * 256) + color.ToFXColor().getBlue() * 255);
				if ( colorTooSimilar.ColorTooSimilarFunction( tempColorNum, oxylblue0FFNum, 82 ) )
					color.set( neongreen.ToFXColor() );
				//color = new ColorSlider(color.fxColor.invert());
				break;
			case 1:
				if ( colorTooSimilar.ColorTooSimilarFunction( color.ToFXColor(), oxylblue0FF.ToFXColor(), 82  ) )
					color.set( gold.ToFXColor() );
				//color = new ColorSlider(color.fxColor.invert());
				break;
			}
		}
		//color = new ColorSlider( rgb );
		fxColor = color.ToFXColor();
		return fxColor;
	}

	public Color ColorSlider( double x, double y, double xSlider, double BrightnessMultiplyer, int Gradations )
	{
		int xRectangleQuantity = 3, yRectangleQuantity = 5;

		for ( xRectangleNum = 0; xRectangleNum < xRectangleQuantity; xRectangleNum++ )
			if ( x >= bounds.getMinX() + bounds.getWidth() * xRectangleNum / xRectangleQuantity && x <= bounds.getMinX() + bounds.getWidth() * ( xRectangleNum + 1 ) / xRectangleQuantity )
				break;
		for ( yRectangleNum = 0; yRectangleNum < yRectangleQuantity; yRectangleNum++ )
			if ( y >= bounds.getMinY() + bounds.getHeight() * yRectangleNum / yRectangleQuantity && y <= bounds.getMinY() + bounds.getHeight() * ( yRectangleNum + 1 ) / yRectangleQuantity )
				break;
		xSlid = x - bounds.getMinX() - xRectangleNum * bounds.getWidth() - xSlider / xRectangleQuantity;
		while ( xSlid < 0 )
			xSlid = xSlid + bounds.getWidth() / xRectangleQuantity;
		while ( xSlid > bounds.getWidth() / xRectangleQuantity )
			xSlid = xSlid - bounds.getWidth() / xRectangleQuantity;

		switch ( yRectangleNum )
		{
		case 0:
			switch ( xRectangleNum )
			{
			case 0:
				color = new ColorSlider();
				break;
			case 1:
				color = new ColorSlider( white.fxColor );
				break;
			case 2:
				color = new ColorSlider( green.ToRGB() );
				break;
			}
			break;
		case 1:
			switch ( xRectangleNum )
			{
			case 0:
				color.ColorSliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, green.ToFXColor(), purple.ToFXColor() );
				break;
			case 1:
				color.ColorSliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, blue.ToFXColor(), green.ToFXColor() );
				break;
			case 2:
				color.ColorSliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, purple.ToFXColor(), green.ToFXColor(), Gradations );
				break;
			}
			break;
		case 2:
			switch ( xRectangleNum )
			{
			case 0:
				color.ColorSliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, purple.ToFXColor(), green.ToFXColor(), Gradations );
				break;
			case 1:
				color.set( Color.CHOCOLATE );
				if ( color.get() == Color.CHOCOLATE )
					color = new ColorSlider ( Color.BLUE );
				else
					color = new ColorSlider ( Color.RED );
				break;
			case 2:
				color = new ColorSlider ( color.ToFXColor( pink.rgb ) );
				break;
			}
			break;
		case 3:
			switch ( xRectangleNum )
			{
			case 0:
				color.ColorSliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, blue.ToFXColor(), oxylblue0FF.ToFXColor() );
				int tempColorNum = (int)((int)( 255 * 16777216) + (int)(color.ToFXColor().getRed() * 255 * 65536) + (int)(color.ToFXColor().getGreen() * 255 * 256) + color.ToFXColor().getBlue() * 255);
				if ( color.ColorTooSimilarFunction( tempColorNum, oxylblue0FFNum ) )
					color.set( neongreen.ToFXColor() );
				break;
			case 1:
				color.ColorSliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, purple.ToFXColor(), oxylblue0FF.ToFXColor() );
				if ( color.ColorTooSimilarFunction( color.ToFXColor(), oxylblue0FF.ToFXColor() ) )
					color.set( Color.MEDIUMSEAGREEN );
				break;
			case 2:
				if ( 0 <= color.ColorValueFitter(5000) && color.ColorValueFitter(5000) <= 255  && 0 <= color.ColorValueFitter(-5000) && color.ColorValueFitter(-5000) <= 255 )
					color = white;
				else
					color = black;
				break;
			}
			break;
		case 4:
			switch ( xRectangleNum )
			{
			case 0:
				color.set( Color.AQUAMARINE );
				break;
			case 1:
				color.set( new double[]{255,134,0} );
				break;
			case 2:
				color = new ColorSlider ( gold.rgb );
				break;
			}
			break;
		}
		rgb = color.rgb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(color.rgb[z]);
			argb[z] = ColorValueFitter(rgb[z]);
		}
		argb[3] = 1;
		//color = new ColorSlider( rgb );
		fxColor = color.ToFXColor();
		return fxColor;
	}

	public Color TransparencySlider( double x, double y, double xSlider, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter )
	{
		int xRectangleQuantity = 4, yRectangleQuantity = 6;

		for ( xRectangleNum = 0; xRectangleNum < xRectangleQuantity; xRectangleNum++ )
			if ( x >= bounds.getMinX() + bounds.getWidth() * xRectangleNum / xRectangleQuantity && x <= bounds.getMinX() + bounds.getWidth() * ( xRectangleNum + 1 ) / xRectangleQuantity )
				break;
		for ( yRectangleNum = 0; yRectangleNum < yRectangleQuantity; yRectangleNum++ )
			if ( y >= bounds.getMinY() + bounds.getHeight() * yRectangleNum / yRectangleQuantity && y <= bounds.getMinY() + bounds.getHeight() * ( yRectangleNum + 1 ) / yRectangleQuantity )
				break;
		xSlid = x - bounds.getMinX() - xRectangleNum * bounds.getWidth() - xSlider / xRectangleQuantity;
		while ( xSlid < 0 )
			xSlid = xSlid + bounds.getWidth() / xRectangleQuantity;
		while ( xSlid > bounds.getWidth() / xRectangleQuantity )
			xSlid = xSlid - bounds.getWidth() / xRectangleQuantity;

		switch ( yRectangleNum )
		{
		case 0:
			switch ( xRectangleNum )
			{
			case 0:
				colorTransparency = new TransparencySlider( );
				break;
			case 1:
				colorTransparency = new TransparencySlider( white.fxColor );
				break;
			case 2:
				colorTransparency = new TransparencySlider( green.rgb );
				break;
			case 3:
				colorTransparency = new TransparencySlider( greenT.argb );
				break;
			}
			break;
		case 1:
			switch ( xRectangleNum )
			{
			case 0:
				colorTransparency.TransparencySliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, greenT.ToFXColor(), purpleT.ToFXColor() );
				break;
			case 1:
				colorTransparency.TransparencySliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, blueT.ToFXColor(), greenT.ToFXColor(), OpacityBefore );
				break;
			case 2:
				colorTransparency.TransparencySliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, blueT.ToFXColor(), redT.ToFXColor(), OpacityBefore, OpacityAfter );
				break;
			case 3:
				colorTransparency.TransparencySliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, redT.ToFXColor(), BrightnessMultiplyer, purpleT.ToFXColor() );
				break;
			}
			break;
		case 2:
			switch ( xRectangleNum )
			{
			case 0:
				colorTransparency.TransparencySliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, blueT.ToFXColor(), BrightnessMultiplyer, brownT.ToFXColor(), OpacityBefore );
				break;
			case 1:
				colorTransparency.TransparencySliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, yellowT.ToFXColor(), BrightnessMultiplyer, redT.ToFXColor(), OpacityBefore, OpacityAfter );
				break;
			case 2:
				colorTransparency.TransparencySliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, Gradations, bronzeT.ToFXColor(), silverT.ToFXColor() );
				break;
			case 3:
				colorTransparency.TransparencySliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, Gradations, silverT.ToFXColor(), goldT.ToFXColor(), OpacityBefore );
				break;
			}
			break;
		case 3:
			switch ( xRectangleNum )
			{
			case 0:
				colorTransparency.TransparencySliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, Gradations, bronzeT.ToFXColor(), goldT.ToFXColor(), OpacityBefore, OpacityAfter );
				break;
			case 1:
				colorTransparency.TransparencySliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, yellowT.ToFXColor(), blueT.ToFXColor() );
				break;
			case 2:
				colorTransparency.TransparencySliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, orangeT.ToFXColor(), blueT.ToFXColor(), OpacityBefore );
				break;
			case 3:
				colorTransparency.TransparencySliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, greenT.ToFXColor(), goldT.ToFXColor(), OpacityBefore, OpacityAfter );
				break;
			}
			break;
		case 4:
			switch ( xRectangleNum )
			{
			case 0:
				colorTransparency = new TransparencySlider ( Color.DEEPSKYBLUE );
				break;
			case 1:
				colorTransparency = new TransparencySlider ( colorTransparency.ToFXColor( pinkT.argb ) );
				break;
			case 2:
				colorTransparency.TransparencySliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, blueT.ToFXColor(), oxylblue0FFT.ToFXColor() );
				//int tempColorNum = (int)((int)( colorTransparency.ToFXColor().getOpacity() * 255 * 16777216) + (int)(colorTransparency.ToFXColor().getRed() * 255 * 65536) + (int)(colorTransparency.ToFXColor().getGreen() * 255 * 256) + colorTransparency.ToFXColor().getBlue() * 255);
				//System.out.println("tempColorNum: " + tempColorNum + " oxylblue0FFNum: " + oxylblue0FFNum);
				fxColor = colorTransparency.ToFXColor();
				if ( colorTransparency.ColorTooSimilarFunction( fxColor, oxylblue0FFT.ToFXColor() ) )
					colorTransparency.set( neongreenT.ToFXColor() );
				break;
			case 3:
				colorTransparency.TransparencySliderFunction( bounds.getWidth() / xRectangleQuantity, xSlid, purpleT.ToFXColor(), oxylblue0FFT.ToFXColor() );
				if ( colorTransparency.ColorTooSimilarFunction( colorTransparency.ToFXColor(), oxylblue0FFT.ToFXColor(), 111 ) )
					colorTransparency.set( neongreenT.ToFXColor() );
				break;
			}
			break;
		case 5:
			switch ( xRectangleNum )
			{
			case 0:
				if ( 0 <= colorTransparency.ColorValueFitter(5000) && colorTransparency.ColorValueFitter(5000) <= 255  && 0 <= colorTransparency.ColorValueFitter(-5000) && colorTransparency.ColorValueFitter(-5000) <= 255 &&
				0 <= colorTransparency.OpacityValueFitter(100) && colorTransparency.OpacityValueFitter(100) <= 1.  && 0 <= colorTransparency.OpacityValueFitter(-100) && colorTransparency.OpacityValueFitter(-100) <= 1.)
					colorTransparency = whiteT;
				else
					colorTransparency = blackT;
				break;
			case 1:
				colorTransparency.set( Color.AQUAMARINE );
				break;
			case 2:
				colorTransparency.set( new double[]{255,134,0} );
				break;
			case 3:
				colorTransparency = new TransparencySlider ( goldT.argb );
				break;
			}
			break;
		}
		/*argb = colorTransparency.argb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(colorTransparency.argb[z]);
			argb[z] = ColorValueFitter(argb[z]);
		}
		argb[3] = OpacityValueFitter(argb[3]);
		colorTransparency = new TransparencySlider( argb );// */
		fxColor = colorTransparency.ToFXColor();
		return fxColor;
	}

	public Color RainbowSoftColor( double x, double y, double xSlider, double BrightnessMultiplyer, int Gradations, Color[] FXcolorArray, double[][] ARGBcolorArray, double OpacityBefore, double OpacityAfter )
	//For Variated Gradations = 2147483647, For Rainbow 2 Fully Black Colors Into FXcolorArray, For Fully Opaque OpacityBefore = 1 & OpacityAfter = 1
	{
		int xRectangleQuantity = 2, yRectangleQuantity = 17;

		for ( xRectangleNum = 0; xRectangleNum < xRectangleQuantity; xRectangleNum++ )
			if ( x >= bounds.getMinX() + bounds.getWidth() * xRectangleNum / xRectangleQuantity && x <= bounds.getMinX() + bounds.getWidth() * ( xRectangleNum + 1 ) / xRectangleQuantity )
				break;
		for ( yRectangleNum = 0; yRectangleNum < yRectangleQuantity; yRectangleNum++ )
			if ( y >= bounds.getMinY() + bounds.getHeight() * yRectangleNum / yRectangleQuantity && y <= bounds.getMinY() + bounds.getHeight() * ( yRectangleNum + 1 ) / yRectangleQuantity )
				break;
		xSlid = x - bounds.getMinX() - xRectangleNum * bounds.getWidth() - xSlider / xRectangleQuantity;//?( 4./7. ) * ?SEEMS LIKE ( 9./16. ) * Before xSlider / .. SHOULD BE Gone Or ( 3./4. ) Instead To Be Rectified To 1 When Multiplied By 4/3
		while ( xSlid < 0 )
			xSlid = xSlid + bounds.getWidth() / xRectangleQuantity;
		while ( xSlid > bounds.getWidth() / xRectangleQuantity )
			xSlid = xSlid - bounds.getWidth() / xRectangleQuantity;
		xSlid = ( 4./3. ) * xSlid - bounds.getWidth() / ( 6. * xRectangleQuantity );
		//System.out.println("xRectangleNum: " + xRectangleNum + " yRectangleNum: " + yRectangleNum );
		switch ( xRectangleNum )
		{
		case 0://1st Column
			switch ( yRectangleNum )
			{
			case 0:
				rainbowSoftColor = new RainbowSoftColor();
				break;
			case 1:
				rainbowSoftColor = new RainbowSoftColor( white.fxColor );
				break;
			case 2:
				argb = new double[] { green.rgb[0], green.rgb[1], green.rgb[2], 1 };
				rainbowSoftColor = new RainbowSoftColor( argb );
				break;
			case 3:
				rainbowSoftColor.RainbowSoftColorRainbowFunction( bounds.getWidth() / xRectangleQuantity, xSlid );
				break;
			case 4:
				rainbowSoftColor.RainbowSoftColorFunction( bounds.getWidth() / xRectangleQuantity, xSlid, green.ToFXColor(), purple.ToFXColor() );
				break;
			case 5:
				rainbowSoftColor.RainbowSoftColorFunction( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, blue.ToFXColor(), green.ToFXColor(), true, OpacityBefore, OpacityAfter );
				break;
			case 6:
				rainbowSoftColor.RainbowSoftColorRainbowFunctionReverse( bounds.getWidth() / xRectangleQuantity, xSlid );
				break;
			case 7:
				rainbowSoftColor.RainbowSoftCustomColorFunction ( bounds.getWidth() / xRectangleQuantity, xSlid, ARGBcolorArray );
				break;
			case 8:
				rainbowSoftColor.RainbowSoftCustomColorFunction ( bounds.getWidth() / xRectangleQuantity, xSlid, FXcolorArray );
				break;
			case 9:
				rainbowSoftColor.RainbowSoftColorRainbowFunctionUnAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations );
				break;
			case 10:
				rainbowSoftColor.RainbowSoftColorRainbowFunctionReverseUnAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations );
				break;
			case 11:
				rainbowSoftColor.RainbowSoftColorRainbowFunctionAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations );
				break;
			case 12:
				rainbowSoftColor.RainbowSoftColorRainbowFunctionReverseAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations );
				break;
			case 13:
				rainbowSoftColor.RainbowSoftColorRainbowTransparencyFunctionUnAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter );
				break;
			case 14:
				rainbowSoftColor.RainbowSoftColorRainbowTransparencyFunctionReverseUnAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter );
				break;
			case 15:
				rainbowSoftColor.RainbowSoftCustomColorFunctionUnAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, ARGBcolorArray );
				break;
			case 16://17th Square
				rainbowSoftColor.RainbowSoftCustomColorFunctionUnAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, FXcolorArray );
				break;
			}
			break;
		case 1://2nd Column
			switch ( yRectangleNum )
			{
			case 0://18th Square
				rainbowSoftColor.RainbowSoftCustomColorFunctionAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, ARGBcolorArray );
				break;
			case 1:
				rainbowSoftColor.RainbowSoftCustomColorFunctionAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, FXcolorArray );
				break;
			case 2:
				rainbowSoftColor.RainbowSoftCustomColorTransparencyFunctionUnAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, ARGBcolorArray, OpacityBefore, OpacityAfter );
				break;
			case 3:
				rainbowSoftColor.RainbowSoftCustomColorTransparencyFunctionUnAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, FXcolorArray, OpacityBefore, OpacityAfter );
				break;
			case 4:
				rainbowSoftColor.RainbowSoftColorRainbowTransparencyFunctionAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter );
				break;
			case 5:
				rainbowSoftColor.RainbowSoftColorRainbowTransparencyFunctionReverseAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter );
				break;
			case 6:
				rainbowSoftColor.RainbowSoftCustomColorTransparencyFunctionAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, ARGBcolorArray, OpacityBefore, OpacityAfter );
				break;
			case 7:
				rainbowSoftColor.RainbowSoftCustomColorTransparencyFunctionAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, FXcolorArray, OpacityBefore, OpacityAfter );
				break;
			case 8://26th Square DiagnosticsClass.java
				rainbowSoftColor = new RainbowSoftColor ( bronzeT.argb );
				rainbowSoftColor = new RainbowSoftColor ( rainbowSoftColor.ToFXColor() );
				break;
			case 9:
				rainbowSoftColor = new RainbowSoftColor ( rainbowSoftColor.ToFXColor( silverT.argb ) );
				break;
			case 10:
				rainbowSoftColor.RainbowSoftColorFunction( bounds.getWidth() / xRectangleQuantity, xSlid, blue.ToFXColor(), oxylblue.ToFXColor() );
				//int tempColorNum = (int)(16777216 + (int)(rainbowSoftColor.ToFXColor().getRed() * 255 * 65536) + (int)(rainbowSoftColor.ToFXColor().getGreen() * 255 * 256) + rainbowSoftColor.ToFXColor().getBlue() * 255);
				fxColor = rainbowSoftColor.ToFXColor();
				if ( rainbowSoftColor.ColorTooSimilarFunction( fxColor, oxylblue.ToFXColor(), 100 ) )
					rainbowSoftColor = new RainbowSoftColor( neongreen.ToFXColor() );
				break;
			case 11:
				rainbowSoftColor.RainbowSoftColorFunction( bounds.getWidth() / xRectangleQuantity, xSlid, purple.ToFXColor(), oxylblue0FF.ToFXColor() );
				if ( rainbowSoftColor.ColorTooSimilarFunction( rainbowSoftColor.ToFXColor(), oxylblue0FF.ToFXColor() ) )
					rainbowSoftColor = new RainbowSoftColor( neongreen.ToFXColor() );
				break;
			case 12:
				if ( 0 <= rainbowSoftColor.ColorValueFitter(5000) && rainbowSoftColor.ColorValueFitter(5000) <= 255  && 0 <= rainbowSoftColor.ColorValueFitter(-5000) && rainbowSoftColor.ColorValueFitter(-5000) <= 255 )
					rainbowSoftColor = new RainbowSoftColor ( white.ToFXColor() );
				else
					rainbowSoftColor = new RainbowSoftColor ( black.ToFXColor() );
				break;
			case 13:
				if ( 0 <= rainbowSoftColor.OpacityValueFitter(100) && rainbowSoftColor.OpacityValueFitter(100) <= 1  && 0 <= rainbowSoftColor.OpacityValueFitter(-100) && rainbowSoftColor.OpacityValueFitter(-100) <= 1 )
					rainbowSoftColor = new RainbowSoftColor ( white.ToFXColor() );
				else
					rainbowSoftColor = new RainbowSoftColor ( black.ToFXColor() );
				break;
			case 14:
				rainbowSoftColor.set( new double[]{255,134,0,1} );
				break;
			case 15:
				rainbowSoftColor.set( Color.AQUAMARINE );
				break;
			case 16:
				rainbowSoftColor = new RainbowSoftColor ( gold.ToFXColor() );
				rainbowSoftColor.set( rainbowSoftColor.ToFXColor() );
				break;
			}
			break;
		}
		/*argb = rainbowSoftColor.argb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(rainbowSoftColor.argb[z]);
			argb[z] = ColorValueFitter(argb[z]);
		}
		argb[3] = OpacityValueFitter(argb[3]);
		rainbowSoftColor = new RainbowSoftColor( argb );// */
		fxColor = rainbowSoftColor.ToFXColor();// */
		return fxColor;
	}
	
	public Color RainbowPattern2D( double x, double y, double xSlider, double BrightnessMultiplyer, int Gradations, Color[] FXcolorArray, double OpacityBefore, double OpacityAfter )
	{//--!Completely Unfinished Function!--
		int xRectangleQuantity = 10, yRectangleQuantity = 5;

		for ( xRectangleNum = 0; xRectangleNum < xRectangleQuantity; xRectangleNum++ )
			if ( x >= bounds.getMinX() + bounds.getWidth() * xRectangleNum / xRectangleQuantity && x <= bounds.getMinX() + bounds.getWidth() * ( xRectangleNum + 1 ) / xRectangleQuantity )
				break;
		for ( yRectangleNum = 0; yRectangleNum < yRectangleQuantity; yRectangleNum++ )
			if ( y >= bounds.getMinY() + bounds.getHeight() * yRectangleNum / yRectangleQuantity && y <= bounds.getMinY() + bounds.getHeight() * ( yRectangleNum + 1 ) / yRectangleQuantity )
				break;
		xSlid = x - bounds.getMinX() - xRectangleNum * bounds.getWidth() - xSlider / xRectangleQuantity;//?( 4./7. ) * ?SEEMS LIKE ( 9./16. ) * Before xSlider / .. SHOULD BE Gone Or ( 3./4. ) Instead To Be Rectified To 1 When Multiplied By 4/3
		while ( xSlid < 0 )
			xSlid = xSlid + bounds.getWidth() / xRectangleQuantity;
		while ( xSlid > bounds.getWidth() / xRectangleQuantity )
			xSlid = xSlid - bounds.getWidth() / xRectangleQuantity;
		xSlid = ( 4./3. ) * xSlid - bounds.getWidth() / ( 6. * xRectangleQuantity );
		//System.out.println("xRectangleNum: " + xRectangleNum + " yRectangleNum: " + yRectangleNum );
		switch ( xRectangleNum )
		{
		case 0://1st Column
			switch ( yRectangleNum )
			{
			case 0:
				rainbowSoftColor = new RainbowSoftColor();
				break;
			case 1:
				rainbowSoftColor = new RainbowSoftColor( white.fxColor );
				break;
			case 2:
				argb = new double[] { green.rgb[0], green.rgb[1], green.rgb[2], 1 };
				rainbowSoftColor = new RainbowSoftColor( argb );
				break;
			case 3:
				rainbowSoftColor.RainbowSoftColorRainbowFunction( bounds.getWidth() / xRectangleQuantity, xSlid );
				break;
			case 4:
				rainbowSoftColor.RainbowSoftColorFunction( bounds.getWidth() / xRectangleQuantity, xSlid, green.ToFXColor(), purple.ToFXColor() );
				break;
			case 5:
				rainbowSoftColor.RainbowSoftColorFunction( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, blue.ToFXColor(), green.ToFXColor(), true, OpacityBefore, OpacityAfter );
				break;
			case 6:
				rainbowSoftColor.RainbowSoftColorRainbowFunctionReverse( bounds.getWidth() / xRectangleQuantity, xSlid );
				break;
			case 7:
				
				break;
			case 8:
				rainbowSoftColor.RainbowSoftCustomColorFunction ( bounds.getWidth() / xRectangleQuantity, xSlid, FXcolorArray );
				break;
			case 9:
				rainbowSoftColor.RainbowSoftColorRainbowFunctionUnAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations );
				break;
			case 10:
				rainbowSoftColor.RainbowSoftColorRainbowFunctionReverseUnAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations );
				break;
			case 11:
				rainbowSoftColor.RainbowSoftColorRainbowFunctionAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations );
				break;
			case 12:
				rainbowSoftColor.RainbowSoftColorRainbowFunctionReverseAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations );
				break;
			case 13:
				rainbowSoftColor.RainbowSoftColorRainbowTransparencyFunctionUnAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter );
				break;
			case 14:
				rainbowSoftColor.RainbowSoftColorRainbowTransparencyFunctionReverseUnAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter );
				break;
			case 15:
				
				break;
			case 16://17th Square
				rainbowSoftColor.RainbowSoftCustomColorFunctionUnAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, FXcolorArray );
				break;
			}
			break;
		case 1://2nd Column
			switch ( yRectangleNum )
			{
			case 0://18th Square
				
				break;
			case 1:
				rainbowSoftColor.RainbowSoftCustomColorFunctionAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, FXcolorArray );
				break;
			case 2:
				
				break;
			case 3:
				rainbowSoftColor.RainbowSoftCustomColorTransparencyFunctionUnAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, FXcolorArray, OpacityBefore, OpacityAfter );
				break;
			case 4:
				rainbowSoftColor.RainbowSoftColorRainbowTransparencyFunctionAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter );
				break;
			case 5:
				rainbowSoftColor.RainbowSoftColorRainbowTransparencyFunctionReverseAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter );
				break;
			case 6:
				
				break;
			case 7:
				rainbowSoftColor.RainbowSoftCustomColorTransparencyFunctionAdjusted ( bounds.getWidth() / xRectangleQuantity, xSlid, BrightnessMultiplyer, Gradations, FXcolorArray, OpacityBefore, OpacityAfter );
				break;
			case 8://26th Square DiagnosticsClass.java
				rainbowSoftColor = new RainbowSoftColor ( bronzeT.argb );
				rainbowSoftColor = new RainbowSoftColor ( rainbowSoftColor.ToFXColor() );
				break;
			case 9:
				rainbowSoftColor = new RainbowSoftColor ( rainbowSoftColor.ToFXColor( silverT.argb ) );
				break;
			case 10:
				rainbowSoftColor.RainbowSoftColorFunction( bounds.getWidth() / xRectangleQuantity, xSlid, blue.ToFXColor(), oxylblue.ToFXColor() );
				//int tempColorNum = (int)(16777216 + (int)(rainbowSoftColor.ToFXColor().getRed() * 255 * 65536) + (int)(rainbowSoftColor.ToFXColor().getGreen() * 255 * 256) + rainbowSoftColor.ToFXColor().getBlue() * 255);
				fxColor = rainbowSoftColor.ToFXColor();
				if ( rainbowSoftColor.ColorTooSimilarFunction( fxColor, oxylblue.ToFXColor(), 100 ) )
					rainbowSoftColor = new RainbowSoftColor( neongreen.ToFXColor() );
				break;
			case 11:
				rainbowSoftColor.RainbowSoftColorFunction( bounds.getWidth() / xRectangleQuantity, xSlid, purple.ToFXColor(), oxylblue0FF.ToFXColor() );
				if ( rainbowSoftColor.ColorTooSimilarFunction( rainbowSoftColor.ToFXColor(), oxylblue0FF.ToFXColor() ) )
					rainbowSoftColor = new RainbowSoftColor( neongreen.ToFXColor() );
				break;
			case 12:
				if ( 0 <= rainbowSoftColor.ColorValueFitter(5000) && rainbowSoftColor.ColorValueFitter(5000) <= 255  && 0 <= rainbowSoftColor.ColorValueFitter(-5000) && rainbowSoftColor.ColorValueFitter(-5000) <= 255 )
					rainbowSoftColor = new RainbowSoftColor ( white.ToFXColor() );
				else
					rainbowSoftColor = new RainbowSoftColor ( black.ToFXColor() );
				break;
			case 13:
				if ( 0 <= rainbowSoftColor.OpacityValueFitter(100) && rainbowSoftColor.OpacityValueFitter(100) <= 1  && 0 <= rainbowSoftColor.OpacityValueFitter(-100) && rainbowSoftColor.OpacityValueFitter(-100) <= 1 )
					rainbowSoftColor = new RainbowSoftColor ( white.ToFXColor() );
				else
					rainbowSoftColor = new RainbowSoftColor ( black.ToFXColor() );
				break;
			case 14:
				rainbowSoftColor.set( new double[]{255,134,0,1} );
				break;
			case 15:
				rainbowSoftColor.set( Color.AQUAMARINE );
				break;
			case 16:
				rainbowSoftColor = new RainbowSoftColor ( gold.ToFXColor() );
				rainbowSoftColor.set( rainbowSoftColor.ToFXColor() );
				break;
			}
			break;
		}
		/*argb = rainbowSoftColor.argb;
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(rainbowSoftColor.argb[z]);
			argb[z] = ColorValueFitter(argb[z]);
		}
		argb[3] = OpacityValueFitter(argb[3]);
		rainbowSoftColor = new RainbowSoftColor( argb );// */
		fxColor = rainbowPattern2D.ToFXColor();// */
		return fxColor;
	}

	public Object RainbowSoftColorGlobalRainbowSoftSelector( double x, double y, double xSlider, double BrightnessMultiplyer, int Gradations, boolean Adjusted, Color[] FXcolorArray, /* double[][] ARGBcolorArray, */ double OpacityBefore, double OpacityAfter, boolean Reversed, boolean IsColorNum )
	{
		rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, 1, 2147483647, false, doubleBlack, 1, 1, false, false);
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, 1, 2147483647, false, doubleBlack, 1, 1, true, false);
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, 1, 2147483647, false, imperialFXcolors, 1, 1, false, true );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, 1, 2147483647, false, imperialFXcolors, 1, 1, false, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, false, doubleBlack, 1, 1, false, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, false, doubleBlack, 1, 1, true, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, true, doubleBlack, 1, 1, false, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, true, doubleBlack, 1, 1, true, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, false, doubleBlack, 0, 1, false, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, false, doubleBlack, 0, 1, true, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, false, imperialFXcolors, 1, 1, false, true );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, false, imperialFXcolors, 1, 1, false, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, true, imperialFXcolors, 1, 1, false, true );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, true, imperialFXcolors, 1, 1, false, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, false, imperialFXcolors, 0, 1, false, true );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, false, imperialFXcolors, 0, 1, false, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, true, doubleBlack, 0, 1, false, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, true, doubleBlack, 0, 1, true, false );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, true, imperialFXcolors, 0, 1, false, true );
		//rainbowSoftColor.GlobalRainbowSoftSelectorFunction( xSlider, xSlid, BrightnessMultiplyer, Gradations, true, imperialFXcolors, 0, 1, false, false );// */
		return colorTransparency.ToFXColor();
	}

	//public Object RainbowSoftColor( double x, double y, double xSlider, double BrightnessMultiplyer, int Gradations, boolean Adjusted, FXcolorArray )
	//{ }
	public Boolean ColorTooSimilarFunction(Color Color1, Color Color2)//4th Square DiagnosticsClass.java
	{
		int currentColorDifference = (int)( 255 * ( Math.abs( Color1.getOpacity() - Color2.getOpacity() ) + Math.abs( Color1.getRed() - Color2.getRed() ) + Math.abs( Color1.getGreen() - Color2.getGreen() ) + Math.abs( Color1.getBlue() - Color2.getBlue() ) ) );
		if ( currentColorDifference <= 164 )//200 )
			tooSimilar = true;
		else
			tooSimilar = false;
		return tooSimilar;
	}
	public Boolean ColorTooSimilarFunction(ColorSlider Color1, ColorSlider Color2)
	{
		tooSimilar = false;
		int colorDifference = (int)( Math.abs(Color1.rgb[0] - Color2.rgb[0]) + Math.abs(Color1.rgb[1] - Color2.rgb[1]) + Math.abs(Color1.rgb[2] - Color2.rgb[2]) );
		if ( colorDifference <= 164 )
			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 = ColorToBeChecked;
		while ( colorBeingChecked < -4080 )
			colorBeingChecked = colorBeingChecked + 4080;
		while ( colorBeingChecked < 0 )
			colorBeingChecked = colorBeingChecked + 255;
		while ( colorBeingChecked > 4080 )
			colorBeingChecked = colorBeingChecked - 4080;
		while ( colorBeingChecked > 255 )
			colorBeingChecked = colorBeingChecked - 255;
		return Math.round(colorBeingChecked);
	}
	public double OpacityValueFitter ( double OpacityToBeChecked )//31st Square DiagnosticsClass.java
	{
		opacityBeingChecked = OpacityToBeChecked;
		while ( opacityBeingChecked < -16 )
			opacityBeingChecked = opacityBeingChecked + 16;
		while ( opacityBeingChecked < 0 )
			opacityBeingChecked = opacityBeingChecked + 1;
		while ( opacityBeingChecked > 1 )
			opacityBeingChecked = opacityBeingChecked - 1;
		while ( opacityBeingChecked > 16 )
			opacityBeingChecked = opacityBeingChecked - 16;
		return opacityBeingChecked;
	}
	public void set(double[] RGB) { rgb = RGB; fxColor = Color.rgb( (int)(ColorValueFitter(rgb[0])), (int)(ColorValueFitter(rgb[1])), (int)(ColorValueFitter(rgb[2])) ); }//13th Square BasicDiagnosticsClass.java
	public void set(Color FXColor) { fxColor = FXColor; rgb = new double[] { ColorValueFitter(fxColor.getRed() * 255), ColorValueFitter(fxColor.getGreen() * 255), ColorValueFitter(fxColor.getBlue() * 255) }; }//14th Square BasicDiagnosticsClass.java
	public Color get() { return fxColor; }
}
