package rainbowPackage;

//import javafx.scene.paint.Paint.*;
import javafx.scene.image.PixelReader;
//import rainbowPackage.VibrantColors;
//import rainbowPackage.VibrantColorCombos;
//import rainbowPackage.RainbowSoftColorCodesSets;
//import javafx.scene.image.PixelWriter;
import javafx.scene.paint.Color;
import java.awt.Dimension;

public final class FwaFlagSplashLogo //RainbowSoft2D Houses A Series Of RainbowVideo.java Videos Or RainbowColorCodeSchemes.java For Frames

//FOR RainbowColorCodeSchemes.java! To Use RainbowSoftColorCodes And Access RainbowPattern2D.java Classes. This Class RainbowSoft2D Deals With Color Coding On 1 Layers To Make A Frame For RainbowVideo.java Which Accesses
{//This Class
	public static double[] rgb = {0,0,0}, argb = {0,0,0,1};
	public static Color fxColor = Color.BEIGE, tempColor = Color.OLIVE;//returnImmediatlyColor = fxColor.LAVENDER;
	public static Color[] fxColorArray = { Color.PINK, Color.SKYBLUE };
	//public static ArrayReverser arrayReverser = new ArrayReverser();
	public static ColorArrayReverser colorArrayReverser = new ColorArrayReverser();
	//public static ColorSlider tempColorSlider = new ColorSlider();
	public static TransparencySlider transparencySlider = new TransparencySlider( VibrantColors.Black );
	public static double colorBeingChecked = 0, opacityBeingChecked = 1;
	public static ColorFader tempColorFader = new ColorFader();
	public static ColorTooSimilar colorTooSimilarFunction = new ColorTooSimilar();
	//public static RainbowSoftColorCodesSets rainbowSoftColorCodesSets = new RainbowSoftColorCodesSets();
	public static double ColorBeingChecked = 0, OpacityBeingChecked = 1, sliderValue = 0, originalFormulaValue = 0, numberOfTransitions = 0, coreVariableStill = 0, coreTranisitionVariable = 0, eightColorDiamondsIndexStill = 0, eightColorDiamondsIndexMoving = 0, eightColorDiamondsIndex = 0;
	public static RainbowSoftColor rainbowSoftColor = new RainbowSoftColor( new double[]{0,0,0,1} );
	public static RainbowPattern2D pattern2D = new RainbowPattern2D( new double[]{0,0,0,1} );
	public static DisplayType displayType = new DisplayType();
	//public static ColorDecide colorDecide = new ColorDecide();
	public static Dimension halfedDim = new Dimension();
	public static boolean someTargetColorInTheCenterHit = false, greenBlueGreenUsed = false;// wheelTipsHit = false, someTargetColorHit = true, greenBlueGreenUsed = false, otherBrowserColorHit = false, makePixelTransparent = false, aColorBarHit = false, aWheelDiamondHit = false;
	static final int maxIndexOfHorizontalColorBars = 17, maxIndexOfVerticalColorBars = 3;
	static int colorBarIndex = 0, colorBarCheck = 0, colorBarDistance = 0;
	static boolean returnImmediately = false, laterReversed = false, someTargetColorHit = true, browserHit = false; //reversalOfBackgroundEffectsSlave = true;

	public FwaFlagSplashLogo( Color FXColor )//Creates Class And Sets Color With JavaFX Color Class //
	{
		fxColor = FXColor;
		rainbowSoftColor = new RainbowSoftColor( 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() };
	}
	public FwaFlagSplashLogo( double[] ARGB )//Creates Class And Sets Color With 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[4];
			for  (int z = 0; z <= 2; z++)
				argb[z] = ColorValueFitter(rgb[z]);
			ARGB[3] = 1;
		}
		else
			argb[3] = OpacityValueFitter(ARGB[3]);
		rainbowSoftColor = new RainbowSoftColor( argb );
		fxColor = rainbowSoftColor.ToFXColor();
	}
	public FwaFlagSplashLogo()//Creates Class And Sets Color To Opake Black //
	{
		rgb = new double[]{0,0,0};
		argb = new double[]{0,0,0,1};
		rainbowSoftColor = new RainbowSoftColor( rgb );
		fxColor = rainbowSoftColor.ToFXColor();
	}
	public Color ToFXColor()//Returns Color In JavaFX
	{
		fxColor = rainbowSoftColor.ToFXColor();
		//return VibrantColors.Red.ToFXColor();//TESTING ONLY
		return fxColor;
	}
	public Color ToFXColor( double[] ARGB )//Changes Class To ARGB Value And Returns Color In JavaFX //
	{
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(ARGB[z]);
			argb[z] = ColorValueFitter(ARGB[z]);
		}
		if ( ARGB.length == 3 )
		{
			argb = new double[4];
			for  (int z = 0; z <= 2; z++)
				argb[z] = ColorValueFitter(rgb[z]);
			ARGB[3] = 1;
		}
		else
			argb[3] = OpacityValueFitter(ARGB[3]);
		rainbowSoftColor = new RainbowSoftColor( argb );
		fxColor = rainbowSoftColor.ToFXColor();
		return fxColor;
	}

	
	public static final Color FwaFlagLogoSplash(double ColorsFactor, double LocationOfStillMovement, double LocationOfColorMovement, double FullSliderRunThrough, int x, int y, double RepeatFactor, double HalfSreenDiagionalLength, double XScaleFactor, double YScaleFactor, boolean Reversed, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter, boolean Adjusted, PixelReader BasisPR, PixelReader BackgroundBasisPR, PixelReader BrowserPR, Dimension Dim, String TypeOfDisplay, Color InitialColorContrastingChoice, Color ColorTooSimilarReplacementColor, double ColorDifference, boolean InvertBasisFromBackground, boolean InvertInsteadOfReverse, boolean InvertBoth, boolean InvertJustOrigional, boolean InvertTextAlways, /*boolean ReversalOfBackgroundEffectsMaster,*/ boolean NextStepColorTooSimilarEffect )
	{
		pattern2D.set( VibrantColors.HalfGrey );
		rainbowSoftColor.set( VibrantColors.HalfGrey );
		double ringSize = 0.175979734764;//50 833 = 783  47 1835 = 1788

		Dimension halfedDim = new Dimension();
		halfedDim.width = (int)Math.round( Dim.width / 2. );//Check Into If This Is Right
		halfedDim.height = (int)Math.round( Dim.height / 2. );//Check Into If This Is Right

		someTargetColorHit = true; //browserHit = false;
		laterReversed = Reversed; //reversalOfBackgroundEffectsSlave = ReversalOfBackgroundEffectsMaster;
		//rainbowSoftColor = new RainbowSoftColor( DisplayTypeDeterminer ( TypeOfDisplay, BasisPR.getColor( x, y ), BackgroundBasisPR.getColor( x, y ), BrowserPR.getColor( x, y ), laterReversed ) );// reversalOfBackgroundEffectsSlave ) );
		rainbowSoftColor.set( displayType.DisplayTypeDeterminer ( TypeOfDisplay, BasisPR.getColor( x, y ), BackgroundBasisPR.getColor( x, y ), BrowserPR.getColor( x, y ), laterReversed ) );// reversalOfBackgroundEffectsSlave ) );
		/*try { Thread.sleep(0,1);//primaryThread.sleep(1);
		} catch (InterruptedException e) {
			System.out.println("Interrupted.");
		}// */
		pattern2D.set( rainbowSoftColor.ToFXColor() );
		rgb = rainbowSoftColor.rgb;
		argb = rainbowSoftColor.argb;
		fxColor = rainbowSoftColor.ToFXColor();
		if ( displayType.returnImmediately )
			return fxColor;

		/*if ( tertiaryXslider < videoSequenceLoopQuantity / 3. )
		{



		}
		else if ( tertiaryXslider < 2. * videoSequenceLoopQuantity / 3. )
		{
			pattern2D.RainbowRingVaryated( ringSize * Dim.height / 2., 0, ( tertiaryXslider + 6. * ringSize * Dim.height ) * ringSize * Dim.height / ( 2. * videoSequenceLoopQuantity ),  ( x - Dim.width / 2. ) * Dim.height / 1788., ( y - Dim.height / 2. + 1. ) * Dim.height / 783., ringSize * Dim.height / 2., (1. - ringSize ) * Dim.height / 2. - .5, Dim.height / 2., VibrantColorCombos.RainbowFXcolorsWNeonGreenCenterReverse, false );
		}
		else
		{

		}// */


		if ( fxColor.getOpacity() == VibrantColors.White.getOpacity() &&
				fxColor.getRed() == VibrantColors.White.getRed() &&
				fxColor.getGreen() == VibrantColors.White.getGreen() &&
				fxColor.getBlue() == VibrantColors.White.getBlue() )
		{//RainbowStrobeGradated
			if ( !displayType.laterReversed )
				pattern2D.RainbowStrobeVaryated( ColorsFactor, LocationOfStillMovement, LocationOfColorMovement, x, y, RepeatFactor, Dim, halfedDim, -HalfSreenDiagionalLength, VibrantColorCombos.RainbowFXcolorsReverseNoPink, displayType.laterReversed && !InvertInsteadOfReverse );//, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter, Adjusted );
			else if ( !InvertInsteadOfReverse )
				pattern2D.RainbowStrobeVaryated( ColorsFactor, LocationOfStillMovement, LocationOfColorMovement, x, y, RepeatFactor, Dim, halfedDim, -HalfSreenDiagionalLength, VibrantColorCombos.RainbowFXcolorsWPinkCenter, !displayType.laterReversed && !InvertInsteadOfReverse );//, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter, Adjusted );
			else
				pattern2D.RainbowStrobeVaryated( ColorsFactor, LocationOfStillMovement, LocationOfColorMovement, x, y, RepeatFactor, Dim, halfedDim, -HalfSreenDiagionalLength, VibrantColorCombos.RainbowFXcolors, displayType.laterReversed );//, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter, Adjusted );
			if ( ( InvertInsteadOfReverse && displayType.laterReversed != Reversed ) || InvertBoth || ( InvertJustOrigional && displayType.laterReversed == Reversed ) || ( InvertTextAlways && displayType.laterReversed != Reversed ) )
				pattern2D.set( pattern2D.ToFXColor().invert() );
			rainbowSoftColor.set( pattern2D.ToFXColor() );
			return ColorDecide.NextColorDecide ( fxColor, BackgroundBasisPR.getColor( x, y ), pattern2D.ToFXColor(), BrowserPR.getColor( x, y ), InitialColorContrastingChoice, ColorTooSimilarReplacementColor, ColorDifference, someTargetColorHit, displayType.laterReversed == Reversed, NextStepColorTooSimilarEffect, InvertBasisFromBackground );
		}
		else if ( fxColor.getOpacity() == VibrantColors.Maroon.getOpacity() &&
				fxColor.getRed() == VibrantColors.Maroon.getRed() &&
				fxColor.getGreen() == VibrantColors.Maroon.getGreen() &&
				fxColor.getBlue() == VibrantColors.Maroon.getBlue() )
		{//304 + 244 = 548 // 656 //Need Correction For Screen Size !!
			if ( !displayType.laterReversed )
				pattern2D.SimpleRainbow( 1880. * XScaleFactor * ColorsFactor / RepeatFactor, - 1880. * XScaleFactor  * LocationOfStillMovement / FullSliderRunThrough, - 1880. * XScaleFactor  * LocationOfColorMovement / FullSliderRunThrough, x - 1880. * XScaleFactor, 1880. * XScaleFactor );//, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter, Adjusted );
			else if ( !InvertInsteadOfReverse )
				pattern2D.SimpleRainbowReverse( 1880. * XScaleFactor * ColorsFactor / RepeatFactor, - 1880. * XScaleFactor  * LocationOfStillMovement / FullSliderRunThrough, - 1880. * XScaleFactor  * LocationOfColorMovement / FullSliderRunThrough, x - 1880. * XScaleFactor, 1880. * XScaleFactor );//, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter, Adjusted );
			else
				pattern2D.SimpleCustomColor( 1880. * XScaleFactor * ColorsFactor / RepeatFactor, - 1880. * XScaleFactor  * LocationOfStillMovement / FullSliderRunThrough, - 1880. * XScaleFactor  * LocationOfColorMovement / FullSliderRunThrough, x - 1880. * XScaleFactor, 1880. * XScaleFactor, VibrantColorCombos.RainbowFXcolorsReverseNoPink );//, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter, Adjusted );
			if ( ( InvertInsteadOfReverse && displayType.laterReversed != Reversed ) || InvertBoth || ( InvertJustOrigional && displayType.laterReversed == Reversed ) || ( InvertTextAlways && displayType.laterReversed != Reversed ) )
				pattern2D.set( pattern2D.ToFXColor().invert() );
			rainbowSoftColor.set( pattern2D.ToFXColor() );
			return ColorDecide.NextColorDecide ( fxColor, BackgroundBasisPR.getColor( x, y ), pattern2D.ToFXColor(), BrowserPR.getColor( x, y ), InitialColorContrastingChoice, ColorTooSimilarReplacementColor, ColorDifference, someTargetColorHit, displayType.laterReversed == Reversed, NextStepColorTooSimilarEffect, InvertBasisFromBackground );
		}
		else if ( fxColor.getOpacity() == VibrantColors.Lime.getOpacity() &&
				fxColor.getRed() == VibrantColors.Lime.getRed() &&
				fxColor.getGreen() == VibrantColors.Lime.getGreen() &&
				fxColor.getBlue() == VibrantColors.Lime.getBlue() )
		{//219 - 197 = 22 1040 / 783 = 0.7528846153846154 : - 16.56346153846154//RainbowRingGradated
			pattern2D.RainbowRingVaryated( ringSize * Dim.height / 2. * ColorsFactor / RepeatFactor, ringSize * halfedDim.height * LocationOfStillMovement / FullSliderRunThrough, ringSize * halfedDim.height * LocationOfColorMovement / FullSliderRunThrough + 29.22094508301405, ( x - Dim.width / 2. + 11.) * Dim.height / 3576., ( y - Dim.height / 2. + 1. - 8. ) * Dim.height / 1566., ringSize * Dim.height / 2., 0, 99999/*(1. - ringSize ) * Dim.height / 2. - .5, Dim.height / 2. */, displayType.laterReversed );//, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter, Adjusted );
			if ( ( InvertInsteadOfReverse && displayType.laterReversed != Reversed ) || InvertBoth || ( InvertJustOrigional && displayType.laterReversed == Reversed ) || ( InvertTextAlways && displayType.laterReversed != Reversed ) )
				pattern2D.set( pattern2D.ToFXColor().invert() );
			rainbowSoftColor.set( pattern2D.ToFXColor() );
			return ColorDecide.NextColorDecide ( fxColor, BackgroundBasisPR.getColor( x, y ), pattern2D.ToFXColor(), BrowserPR.getColor( x, y ), InitialColorContrastingChoice, ColorTooSimilarReplacementColor, ColorDifference, someTargetColorHit, displayType.laterReversed == Reversed, NextStepColorTooSimilarEffect, InvertBasisFromBackground );
		}
		else if ( fxColor.getOpacity() == VibrantColors.Black.getOpacity() &&
				fxColor.getRed() == VibrantColors.Black.getRed() &&
				fxColor.getGreen() == VibrantColors.Black.getGreen() &&
				fxColor.getBlue() == VibrantColors.Black.getBlue() )
		{//304 + 244 = 548 // 656 //Need Correction For Screen Size !!
			if ( !displayType.laterReversed )//243 1679
				pattern2D.SimpleCustomColor( 1436. * XScaleFactor  * ColorsFactor / RepeatFactor, - 1436. * XScaleFactor  * LocationOfStillMovement / FullSliderRunThrough, - 1436. * XScaleFactor  * LocationOfColorMovement / FullSliderRunThrough, x - 222., 1436. * XScaleFactor, BrightnessMultiplyer, Gradations, VibrantColorCombos.BlackWhiteFX,  OpacityBefore, OpacityAfter, Adjusted );
			else if ( !InvertInsteadOfReverse )
				pattern2D.SimpleCustomColor( 1436. * XScaleFactor * ColorsFactor / RepeatFactor, - 1436. * XScaleFactor  * LocationOfStillMovement / FullSliderRunThrough, - 1436. * XScaleFactor  * LocationOfColorMovement / FullSliderRunThrough, x - 222., 1436. * XScaleFactor, BrightnessMultiplyer, Gradations, VibrantColorCombos.OxylBlueRedFX, OpacityBefore, OpacityAfter, Adjusted );
			else
				pattern2D.SimpleCustomColor( 1436. * XScaleFactor * ColorsFactor / RepeatFactor, - 1436. * XScaleFactor  * LocationOfStillMovement / FullSliderRunThrough, - 1436. * XScaleFactor  * LocationOfColorMovement / FullSliderRunThrough, x - 222., 1436. * XScaleFactor, BrightnessMultiplyer, Gradations, VibrantColorCombos.WhiteBlackFX, OpacityBefore, OpacityAfter, Adjusted );
			if ( ( InvertInsteadOfReverse && displayType.laterReversed != Reversed ) || InvertBoth || ( InvertJustOrigional && displayType.laterReversed == Reversed ) || ( InvertTextAlways && displayType.laterReversed != Reversed ) )
				pattern2D.set( pattern2D.ToFXColor().invert() );
			rainbowSoftColor.set( pattern2D.ToFXColor() );
			return ColorDecide.NextColorDecide ( fxColor, BackgroundBasisPR.getColor( x, y ), pattern2D.ToFXColor(), BrowserPR.getColor( x, y ), InitialColorContrastingChoice, ColorTooSimilarReplacementColor, ColorDifference, someTargetColorHit, displayType.laterReversed == Reversed, NextStepColorTooSimilarEffect, InvertBasisFromBackground );
		}
		else if ( fxColor.getOpacity() == VibrantColors.Magenta.getOpacity() &&
				fxColor.getRed() == VibrantColors.Magenta.getRed() &&
				fxColor.getGreen() == VibrantColors.Magenta.getGreen() &&
				fxColor.getBlue() == VibrantColors.Magenta.getBlue() )
		{//304 + 244 = 548 // 656 //Need Correction For Screen Size !!
			if ( !displayType.laterReversed )//400 1525 //Math.PI / 2., 0, Math.PI * ( tertiaryXslider / videoSequenceLoopQuantity ) / 2., x - halfedDim.width, y - halfedDim.height, Math.PI / 2., false
				pattern2D.RainbowClockVaryated( ColorsFactor / RepeatFactor * Math.PI / 2., Math.PI * ( LocationOfStillMovement / FullSliderRunThrough ) / 2., - Math.PI * ( - LocationOfColorMovement / FullSliderRunThrough ) / 2., x - halfedDim.width, y - halfedDim.height, RepeatFactor / ColorsFactor * Math.PI / 2., VibrantColorCombos.RainbowFXcolorsReverseNoPink, displayType.laterReversed );//, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter, Adjusted );
			else if ( !InvertInsteadOfReverse )//10 23 VibrantColorCombos.HalfGrayToDarkGreyFX
				pattern2D.RainbowClockVaryated( ColorsFactor / RepeatFactor * Math.PI / 2., Math.PI * ( LocationOfStillMovement / FullSliderRunThrough ) / 2., - Math.PI * ( - LocationOfColorMovement / FullSliderRunThrough ) / 2., x - halfedDim.width, y - halfedDim.height, RepeatFactor / ColorsFactor * Math.PI / 2., VibrantColorCombos.RainbowFXcolorsWPinkCenter /*VibrantColorCombos.HalfGrayToDarkGreyFX*/, !displayType.laterReversed );//, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter, Adjusted );
			else
				pattern2D.RainbowClockVaryated( ColorsFactor / RepeatFactor * Math.PI / 2., Math.PI * ( LocationOfStillMovement / FullSliderRunThrough ) / 2., - Math.PI * ( - LocationOfColorMovement / FullSliderRunThrough ) / 2., x - halfedDim.width, y - halfedDim.height, RepeatFactor / ColorsFactor * Math.PI / 2., VibrantColorCombos.RainbowFXcolors /*VibrantColorCombos.HalfGrayToDarkGreyFX*/, !displayType.laterReversed );//, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter, Adjusted );
			if ( ( InvertInsteadOfReverse && displayType.laterReversed != Reversed ) || InvertBoth || ( InvertJustOrigional && displayType.laterReversed == Reversed ) || ( InvertTextAlways && displayType.laterReversed != Reversed ) )
				pattern2D.set( pattern2D.ToFXColor().invert() );
			rainbowSoftColor.set( pattern2D.ToFXColor() );
			return ColorDecide.NextColorDecide ( fxColor, BackgroundBasisPR.getColor( x, y ), pattern2D.ToFXColor(), BrowserPR.getColor( x, y ), InitialColorContrastingChoice, ColorTooSimilarReplacementColor, ColorDifference, someTargetColorHit, displayType.laterReversed == Reversed, NextStepColorTooSimilarEffect, InvertBasisFromBackground );
		}
		else if ( fxColor.getOpacity() == VibrantColors.Teal.getOpacity() &&
				fxColor.getRed() == VibrantColors.Teal.getRed() &&
				fxColor.getGreen() == VibrantColors.Teal.getGreen() &&
				fxColor.getBlue() == VibrantColors.Teal.getBlue() )
		{
			if ( !displayType.laterReversed )
				transparencySlider.TransparencySliderFunction(ColorsFactor / RepeatFactor, LocationOfStillMovement / FullSliderRunThrough, VibrantColors.Green, VibrantColors.Pink );
				//pattern2D.TransparencySliderFunction(ColorsFactor / RepeatFactor, LocationOfStillMovement / FullSliderRunThrough, VibrantColors.Green, VibrantColors.Pink );
			else if ( !InvertInsteadOfReverse )
				transparencySlider.TransparencySliderFunction(ColorsFactor / RepeatFactor, LocationOfStillMovement / FullSliderRunThrough, VibrantColors.White, VibrantColors.NeonGreen );
				//pattern2D.TransparencySliderFunction(ColorsFactor / RepeatFactor, LocationOfStillMovement / FullSliderRunThrough, VibrantColors.White, VibrantColors.NeonGreen );
			else
				transparencySlider.TransparencySliderFunction(ColorsFactor / RepeatFactor, LocationOfStillMovement / FullSliderRunThrough, VibrantColors.SkyBlue, VibrantColors.Brown );
			pattern2D.set( transparencySlider.ToFXColor() );
			if ( ( InvertInsteadOfReverse && displayType.laterReversed != Reversed ) || InvertBoth || ( InvertJustOrigional && displayType.laterReversed == Reversed ) || ( InvertTextAlways && displayType.laterReversed != Reversed ) )
				pattern2D.set( pattern2D.ToFXColor().invert() );
			rainbowSoftColor.set( pattern2D.ToFXColor() );
			return ColorDecide.NextColorDecide ( fxColor, BackgroundBasisPR.getColor( x, y ), pattern2D.ToFXColor(), BrowserPR.getColor( x, y ), InitialColorContrastingChoice, ColorTooSimilarReplacementColor, ColorDifference, someTargetColorHit, displayType.laterReversed == Reversed, NextStepColorTooSimilarEffect, InvertBasisFromBackground );

			/*
					//System.out.println( "After x: " + x +  " y: " + y + " Don't Use ColorFader Again" );
					//System.exit(0);
					if ( x == 648 && y == 788 )
					{
						tempColorFader = new ColorFader();
						tempColorFader.ColorFaderFunction( FullSliderRunThrough, LocationOfStillMovement / FullSliderRunThrough, VibrantColors.Green, VibrantColors.Pink );
					}
					pattern2D.set( tempColorFader.fxColor );
					rainbowSoftColor.set( pattern2D.ToFXColor() );
					return ColorDecide.NextColorDecide ( fxColor, BackgroundBasisPR.getColor( x, y ), pattern2D.ToFXColor(), BrowserPR.getColor( x, y ), InitialColorContrastingChoice, ColorTooSimilarReplacementColor, ColorDifference, someTargetColorHit, displayType.laterReversed == Reversed, NextStepColorTooSimilarEffect, InvertBasisFromBackground );// */
		}
		else if ( fxColor.getOpacity() == VibrantColors.NonHotPink.getOpacity() &&
				fxColor.getRed() == VibrantColors.NonHotPink.getRed() &&
				fxColor.getGreen() == VibrantColors.NonHotPink.getGreen() &&
				fxColor.getBlue() == VibrantColors.NonHotPink.getBlue() )
		{
			if ( !displayType.laterReversed )
				pattern2D.SimpleRainbow( Dim.width * ColorsFactor / RepeatFactor, - Dim.width * LocationOfStillMovement / FullSliderRunThrough, - Dim.width * LocationOfColorMovement / FullSliderRunThrough, x, Dim.width );//, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter, Adjusted );
			else if ( !InvertInsteadOfReverse )
				pattern2D.SimpleRainbowReverse( Dim.width * ColorsFactor / RepeatFactor, - Dim.width * LocationOfStillMovement / FullSliderRunThrough, - Dim.width * LocationOfColorMovement / FullSliderRunThrough, x, Dim.width );//, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter, Adjusted );
			else
				pattern2D.SimpleCustomColor( Dim.width * ColorsFactor / RepeatFactor, - Dim.width * LocationOfStillMovement / FullSliderRunThrough, - Dim.width * LocationOfColorMovement / FullSliderRunThrough, x, Dim.width, VibrantColorCombos.RainbowFXcolorsReverseNoPink );//, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter, Adjusted );
			if ( ( InvertInsteadOfReverse && displayType.laterReversed != Reversed ) || InvertBoth || ( InvertJustOrigional && displayType.laterReversed == Reversed ) || ( InvertTextAlways && displayType.laterReversed != Reversed ) )
				pattern2D.set( pattern2D.ToFXColor().invert() );
			rainbowSoftColor.set( pattern2D.ToFXColor() );
			//return VibrantColors.NeonGreen.ToFXColor();
			return ColorDecide.NextColorDecide ( fxColor, BackgroundBasisPR.getColor( x, y ), pattern2D.ToFXColor(), BrowserPR.getColor( x, y ), InitialColorContrastingChoice, ColorTooSimilarReplacementColor, ColorDifference, someTargetColorHit, displayType.laterReversed == Reversed, NextStepColorTooSimilarEffect, InvertBasisFromBackground );
		}
		else
		{
			someTargetColorHit = false;
			if ( displayType.laterReversed != Reversed )
			{
				//pattern2D.set( fxColor.invert() );//pattern2D.set( fxColor.invert() );
				//pattern2D.set( VibrantColors.Gold );
				//rainbowSoftColor.set( pattern2D.ToFXColor() );
				//return pattern2D.ToFXColor();// */
				pattern2D.set( fxColor );
				if ( ( InvertInsteadOfReverse && displayType.laterReversed != Reversed ) || InvertBoth || ( InvertJustOrigional && displayType.laterReversed == Reversed ) || ( InvertTextAlways && displayType.laterReversed != Reversed ) )
					pattern2D.set( pattern2D.ToFXColor().invert() );
				rainbowSoftColor.set( pattern2D.ToFXColor() );
				return ColorDecide.NextColorDecide ( fxColor, BackgroundBasisPR.getColor( x, y ), pattern2D.ToFXColor(), BrowserPR.getColor( x, y ), InitialColorContrastingChoice, ColorTooSimilarReplacementColor, ColorDifference, someTargetColorHit, displayType.laterReversed == Reversed, NextStepColorTooSimilarEffect, InvertBasisFromBackground );
			}
		}
		//pattern2D.set( fxColor );
		//rainbowSoftColor.set( pattern2D.ToFXColor() );
		//return pattern2D.ToFXColor();
		//pattern2D.set( VibrantColors.Silver );// = new RainbowSoftColor( new double[] { 255 * BasisPR.getColor( x, y ).getRed(), 255 * BasisPR.getColor( x, y ).getGreen(), 255 * BasisPR.getColor( x, y ).getBlue(), BasisPR.getColor( x, y ).getOpacity() } );
		pattern2D.set( fxColor );
		if ( ( InvertInsteadOfReverse && displayType.laterReversed != Reversed ) || InvertBoth || ( InvertJustOrigional && displayType.laterReversed == Reversed ) || ( InvertTextAlways && displayType.laterReversed != Reversed ) )
			pattern2D.set( pattern2D.ToFXColor().invert() );
		rainbowSoftColor.set( pattern2D.ToFXColor() );
		/*rgb = rainbowSoftColor.rgb;
		argb = rainbowSoftColor.argb;
		fxColor = rainbowSoftColor.ToFXColor();// */
		return ColorDecide.NextColorDecide ( BackgroundBasisPR.getColor( x, y ), BackgroundBasisPR.getColor( x, y ), pattern2D.ToFXColor(), BrowserPR.getColor( x, y ), InitialColorContrastingChoice, ColorTooSimilarReplacementColor, ColorDifference, someTargetColorHit, displayType.laterReversed == Reversed, NextStepColorTooSimilarEffect, InvertBasisFromBackground );
	}


	public Color RainbowVideoTest(double ColorsFactor, double LocationOfStillMovement, double LocationOfColorMovement, double FullSliderRunThrough, int x, int y, double RepeatFactor, double SpiralFactor, double NumberOfSpirals, double HalfSreenDiagionalLength, boolean Reversed, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter, boolean Adjusted, PixelReader BasisPR, PixelReader BackgroundBasisPR, PixelReader BrowserPR, Dimension Dim, String TypeOfDisplay, Color InitialColorContrastingChoice, Color ColorTooSimilarReplacementColor, double ColorDifference, boolean InvertBasisFromBackground, boolean InvertInsteadOfReverse, boolean InvertBoth, boolean InvertJustOrigional, boolean InvertTextAlways, /*boolean ReversalOfBackgroundEffectsMaster,*/ boolean NextStepColorTooSimilarEffect )
	{
		pattern2D.set( VibrantColors.HalfGrey );
		rainbowSoftColor.set( VibrantColors.HalfGrey );
		pattern2D.RainbowDoubleExponentiator( FullSliderRunThrough * - ColorsFactor / RepeatFactor, LocationOfStillMovement, LocationOfColorMovement, x, y, FullSliderRunThrough, Dim, 4., -1, displayType.laterReversed && !InvertInsteadOfReverse, BrightnessMultiplyer, Gradations, OpacityBefore, OpacityAfter, Adjusted );
		if ( ( InvertInsteadOfReverse && displayType.laterReversed != Reversed ) || InvertBoth || ( InvertJustOrigional && displayType.laterReversed == Reversed ) || ( InvertTextAlways && displayType.laterReversed != Reversed ) )
			pattern2D.set( pattern2D.ToFXColor().invert() );
		rainbowSoftColor.set( pattern2D.ToFXColor() );
		//rainbowSoftColor = new RainbowSoftColor( new double[] { 255 * fxColor.getRed(), 255 * fxColor.getGreen(), 255 * fxColor.getBlue(), fxColor.getOpacity() } );
		rgb = rainbowSoftColor.rgb;
		argb = rainbowSoftColor.argb;
		fxColor = rainbowSoftColor.ToFXColor();
		return fxColor;
	}

	/*public Color[] CustomColorsReverser ( Color[] FXcolorArray )//Reverses Custom Colors By Flipping Around Colors Like Rainbow Reversal Without Changing Any Colors Like Green In Rainbow To Pink In Reversed //
	{//!!Use ColorArrayReverser If Visual Clarity And Appeal Is Needed!!
		fxColorArray = new Color[FXcolorArray.length];
		for (int c = 0; c < FXcolorArray.length; c++)
			fxColorArray[c] = FXcolorArray[ FXcolorArray.length - c - 1 ];
		return fxColorArray;
	}// */
	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 > 16 )
			opacityBeingChecked = opacityBeingChecked - 16;
		while ( opacityBeingChecked > 1 )
			opacityBeingChecked = opacityBeingChecked - 1;
		return opacityBeingChecked;
	}
	public void set(double[] ARGB) { argb = ARGB; rgb[0] = ARGB[0]; rgb[1] = ARGB[1]; rgb[2] = ARGB[2]; fxColor = Color.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), (int)(OpacityValueFitter(ARGB[3])) ); rainbowSoftColor = new RainbowSoftColor( ARGB ); }//Assigns Colors With ARGB //29th Square In SimpleDiagnosticsClass.java
	public void set(Color FXColor) { fxColor = FXColor; argb = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255, FXColor.getOpacity() }; rgb = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255 }; rainbowSoftColor = new RainbowSoftColor( argb ); }//Assigns Colors With FXColor //30th Square In SimpleDiagnosticsClass.java
	public Color get() { return fxColor; }//Returns Always Happen With Variable Output With ARGB Functionality //31st Square In SimpleDiagnosticsClass.java
}