package rainbowPackage;

import javafx.scene.paint.Color;

public final class ColorArrayReverser
{
	ColorTooSimilar colorTooSimilar = new ColorTooSimilar();
	TransparencySlider transparencySlider = new TransparencySlider( VibrantColors.Black );
	int b = 0;
	double c = 0;
	public Color[] colorArray;
	public ColorArrayReverser()
	{
		colorArray = new Color[0];
	}
	public ColorArrayReverser(int Length)
	{
		colorArray = new Color[Length];
	}
	public ColorArrayReverser(Color[] ColorArray)
	{
		colorArray = ColorArray;
	}
	public Color[] ReverseArray(Color[] ColorArray, boolean MakeAllReverseColorsClear)
	{
		colorArray = new Color[ColorArray.length];
		if ( !MakeAllReverseColorsClear )
		{
			c = ColorArray.length / 2.;
			if ( Math.floor(c) != c )
				for (int a = 0; a < ColorArray.length; a++)
				{
					b = ColorArray.length - 1 - a;
					if ( b != a || !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ColorArray[b]) )
						colorArray[b] = ColorArray[a];
					else
					{
						transparencySlider.TransparencySliderFunction(2, 1, ColorArray[a], ColorArray[b]);
						if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), VibrantColors.Pink) )
							colorArray[b] = VibrantColors.Pink;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), VibrantColors.NeonGreen) )
							colorArray[b] = VibrantColors.NeonGreen;
						else //if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), VibrantColors.OxylBlue) )
							colorArray[b] = VibrantColors.OxylBlue;
					}
				}
			else
				for (int a = 0; a < ColorArray.length; a++)
				{
					b = ColorArray.length - 1 - a;
					if ( !( a <= c && a >= c - 1 ) || !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ColorArray[b]) )
						colorArray[b] = ColorArray[a];
					else
					{
						if ( a != c)
							if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.NeonGreen) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.NeonGreen) )
								colorArray[b] = VibrantColors.NeonGreen;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.OxylBlue) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.OxylBlue) )
								colorArray[b] = VibrantColors.OxylBlue;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Pink) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Pink) )
								colorArray[b] = VibrantColors.Pink;
							else //if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Brown) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Brown) )
								colorArray[b] = VibrantColors.Brown;
						else
							if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.OxylBlue) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.OxylBlue) )
								colorArray[b] = VibrantColors.OxylBlue;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.NeonGreen) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.NeonGreen) )
								colorArray[b] = VibrantColors.NeonGreen;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Brown) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Brown) )
								colorArray[b] = VibrantColors.Brown;
							else //if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Pink) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Pink) )
								colorArray[b] = VibrantColors.Pink;
					}
				}
		}
		else
		{
			c = ColorArray.length / 2.;
			if ( Math.floor(c) != c )
				for (int a = 0; a < ColorArray.length; a++)
				{
					b = ColorArray.length - 1 - a;
					if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ColorArray[b]) )
						colorArray[b] = ColorArray[a];
					else
					{
						transparencySlider.TransparencySliderFunction(2, 1, ColorArray[a], ColorArray[b]);
						if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), VibrantColors.Pink) )
							colorArray[b] = VibrantColors.Pink;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), VibrantColors.NeonGreen) )
							colorArray[b] = VibrantColors.NeonGreen;
						else //if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), VibrantColors.OxylBlue) )
							colorArray[b] = VibrantColors.OxylBlue;
					}
				}
			else
				for (int a = 0; a < ColorArray.length; a++)
				{
					b = ColorArray.length - 1 - a;
					if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ColorArray[b]) )
						colorArray[b] = ColorArray[a];
					else
						if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.OxylBlue) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.OxylBlue) )
							colorArray[b] = VibrantColors.OxylBlue;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.NeonGreen) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.NeonGreen) )
							colorArray[b] = VibrantColors.NeonGreen;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Brown) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Brown) )
							colorArray[b] = VibrantColors.Brown;
						else //if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Pink) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Pink) )
							colorArray[b] = VibrantColors.Pink;
				}
		}
		return colorArray;
	}
	public Color[] ReverseArray(Color[] ColorArray, Color ReplacementColor, boolean MakeAllReverseColorsClear)
	{
		colorArray = new Color[ColorArray.length];
		if ( !MakeAllReverseColorsClear )
		{
			c = ColorArray.length / 2.;
			if ( Math.floor(c) != c )
				for (int a = 0; a < ColorArray.length; a++)
				{
					b = ColorArray.length - 1 - a;
					if ( b != a || !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ColorArray[b]) )
						colorArray[b] = ColorArray[a];
					else
					{
						transparencySlider.TransparencySliderFunction(2, 1, ColorArray[a], ColorArray[b]);
						if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), ReplacementColor) )
							colorArray[b] = ReplacementColor;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), VibrantColors.NeonGreen) )
							colorArray[b] = VibrantColors.NeonGreen;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), VibrantColors.OxylBlue) )
							colorArray[b] = VibrantColors.OxylBlue;
						else //if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), VibrantColors.Pink) )
							colorArray[b] = VibrantColors.Pink;
					}
				}
			else
				for (int a = 0; a < ColorArray.length; a++)
				{
					b = ColorArray.length - 1 - a;
					if ( !( a <= c && a >= c - 1 ) || !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ColorArray[b]) )
						colorArray[b] = ColorArray[a];
					else
					{
						if ( a != c)
							if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], ReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ReplacementColor) )
								colorArray[b] = ReplacementColor;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.NeonGreen) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.NeonGreen) )
								colorArray[b] = VibrantColors.NeonGreen;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.OxylBlue) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.OxylBlue) )
								colorArray[b] = VibrantColors.OxylBlue;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Pink) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Pink) )
								colorArray[b] = VibrantColors.Pink;
							else //if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Brown) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Brown) )
								colorArray[b] = VibrantColors.Brown;
						else
							if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], ReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ReplacementColor) )
								colorArray[b] = ReplacementColor;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.OxylBlue) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.OxylBlue) )
								colorArray[b] = VibrantColors.OxylBlue;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.NeonGreen) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.NeonGreen) )
								colorArray[b] = VibrantColors.NeonGreen;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Brown) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Brown) )
								colorArray[b] = VibrantColors.Brown;
							else //if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Pink) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Pink) )
								colorArray[b] = VibrantColors.Pink;
					}
				}
		}
		else
		{
			c = ColorArray.length / 2.;
			if ( Math.floor(c) != c )
				for (int a = 0; a < ColorArray.length; a++)
				{
					b = ColorArray.length - 1 - a;
					if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ColorArray[b]) )
						colorArray[b] = ColorArray[a];
					else
					{
						transparencySlider.TransparencySliderFunction(2, 1, ColorArray[a], ColorArray[b]);
						if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), ReplacementColor) )
							colorArray[b] = ReplacementColor;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), VibrantColors.NeonGreen) )
							colorArray[b] = VibrantColors.NeonGreen;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), VibrantColors.OxylBlue) )
							colorArray[b] = VibrantColors.OxylBlue;
						else //if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), VibrantColors.Pink) )
							colorArray[b] = VibrantColors.Pink;
					}
				}
			else
				for (int a = 0; a < ColorArray.length; a++)
				{
					b = ColorArray.length - 1 - a;
					if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ColorArray[b]) )
						colorArray[b] = ColorArray[a];
					else
						if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], ReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ReplacementColor) )
							colorArray[b] = ReplacementColor;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.OxylBlue) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.OxylBlue) )
							colorArray[b] = VibrantColors.OxylBlue;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.NeonGreen) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.NeonGreen) )
							colorArray[b] = VibrantColors.NeonGreen;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Brown) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Brown) )
							colorArray[b] = VibrantColors.Brown;
						else //if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Pink) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Pink) )
							colorArray[b] = VibrantColors.Pink;
				}
		}
		return colorArray;
	}
	public Color[] ReverseArray(Color[] ColorArray, Color FirstReplacementColor, Color SecondReplacementColor, boolean MakeAllReverseColorsClear)
	{
		colorArray = new Color[ColorArray.length];
		if ( !MakeAllReverseColorsClear )
		{
			c = ColorArray.length / 2.;
			if ( Math.floor(c) != c )
				for (int a = 0; a < ColorArray.length; a++)
				{
					b = ColorArray.length - 1 - a;
					if ( b != a || !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ColorArray[b]) )
						colorArray[b] = ColorArray[a];
					else
					{
						transparencySlider.TransparencySliderFunction(2, 1, ColorArray[a], ColorArray[b]);
						if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), FirstReplacementColor) )
							colorArray[b] = FirstReplacementColor;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), SecondReplacementColor) )
							colorArray[b] = SecondReplacementColor;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), VibrantColors.NeonGreen) )
							colorArray[b] = VibrantColors.NeonGreen;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), VibrantColors.OxylBlue) )
							colorArray[b] = VibrantColors.OxylBlue;
						else //if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), VibrantColors.Pink) )
							colorArray[b] = VibrantColors.Pink;
					}
				}
			else
				for (int a = 0; a < ColorArray.length; a++)
				{
					b = ColorArray.length - 1 - a;
					if ( !( a <= c && a >= c - 1 ) || !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ColorArray[b]) )
						colorArray[b] = ColorArray[a];
					else
					{
						if ( a != c)
							if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], FirstReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], FirstReplacementColor) )
								colorArray[b] = FirstReplacementColor;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], SecondReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], SecondReplacementColor) )
								colorArray[b] = SecondReplacementColor;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.NeonGreen) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.NeonGreen) )
								colorArray[b] = VibrantColors.NeonGreen;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.OxylBlue) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.OxylBlue) )
								colorArray[b] = VibrantColors.OxylBlue;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Pink) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Pink) )
								colorArray[b] = VibrantColors.Pink;
							else //if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Brown) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Brown) )
								colorArray[b] = VibrantColors.Brown;
						else 
							if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], SecondReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], SecondReplacementColor) )
								colorArray[b] = SecondReplacementColor;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], FirstReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], FirstReplacementColor) )
								colorArray[b] = FirstReplacementColor;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.OxylBlue) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.OxylBlue) )
								colorArray[b] = VibrantColors.OxylBlue;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.NeonGreen) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.NeonGreen) )
								colorArray[b] = VibrantColors.NeonGreen;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Brown) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Brown) )
								colorArray[b] = VibrantColors.Brown;
							else //if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Pink) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Pink) )
								colorArray[b] = VibrantColors.Pink;
					}
				}
		}
		else
		{
			c = ColorArray.length / 2.;
			if ( Math.floor(c) != c )
				for (int a = 0; a < ColorArray.length; a++)
				{
					b = ColorArray.length - 1 - a;
					if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ColorArray[b]) )
						colorArray[b] = ColorArray[a];
					else
					{
						if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], FirstReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], FirstReplacementColor) )
							colorArray[b] = FirstReplacementColor;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], SecondReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], SecondReplacementColor) )
							colorArray[b] = SecondReplacementColor;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.NeonGreen) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.NeonGreen) )
							colorArray[b] = VibrantColors.NeonGreen;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.OxylBlue) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.OxylBlue) )
							colorArray[b] = VibrantColors.OxylBlue;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Pink) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Pink) )
							colorArray[b] = VibrantColors.Pink;
						else //if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Brown) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Brown) )
							colorArray[b] = VibrantColors.Brown;
					}
				}
			else for (int a = 0; a < ColorArray.length; a++)
			{
				b = ColorArray.length - 1 - a;
				if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ColorArray[b]) )
					colorArray[b] = ColorArray[a];
				else
					if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], FirstReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], FirstReplacementColor) )
						colorArray[b] = FirstReplacementColor;
					else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], SecondReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], SecondReplacementColor) )
						colorArray[b] = SecondReplacementColor;
					else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.OxylBlue) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.OxylBlue) )
						colorArray[b] = VibrantColors.OxylBlue;
					else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.NeonGreen) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.NeonGreen) )
						colorArray[b] = VibrantColors.NeonGreen;
					else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Brown) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Brown) )
						colorArray[b] = VibrantColors.Brown;
					else //if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Pink) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Pink) )
						colorArray[b] = VibrantColors.Pink;
			}
		}
		return colorArray;
	}
	public Color[] ReverseArray(Color[] ColorArray, Color FirstReplacementColor, Color SecondReplacementColor, Color ThirdReplacementColor, boolean MakeAllReverseColorsClear)
	{
		colorArray = new Color[ColorArray.length];
		if ( !MakeAllReverseColorsClear )
		{
			c = ColorArray.length / 2.;
			if ( Math.floor(c) != c )
				for (int a = 0; a < ColorArray.length; a++)
				{
					b = ColorArray.length - 1 - a;
					if ( b != a || !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ColorArray[b]) )
						colorArray[b] = ColorArray[a];
					else
					{
						transparencySlider.TransparencySliderFunction(2, 1, ColorArray[a], ColorArray[b]);
						if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), FirstReplacementColor) )
							colorArray[b] = FirstReplacementColor;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), SecondReplacementColor) )
							colorArray[b] = SecondReplacementColor;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(transparencySlider.ToFXColor(), ThirdReplacementColor) )
							colorArray[b] = ThirdReplacementColor;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.NeonGreen) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.NeonGreen) )
							colorArray[b] = VibrantColors.NeonGreen;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.OxylBlue) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.OxylBlue) )
							colorArray[b] = VibrantColors.OxylBlue;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Pink) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Pink) )
							colorArray[b] = VibrantColors.Pink;
						else //if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Brown) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Brown) )
							colorArray[b] = VibrantColors.Brown;
					}
				}
			else
				for (int a = 0; a < ColorArray.length; a++)
				{
					b = ColorArray.length - 1 - a;
					if ( !( a <= c && a >= c - 1 ) || !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ColorArray[b]) )
						colorArray[b] = ColorArray[a];
					else
						if ( a != c)
							if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], FirstReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], FirstReplacementColor) )
								colorArray[b] = FirstReplacementColor;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], SecondReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], SecondReplacementColor) )
								colorArray[b] = SecondReplacementColor;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], ThirdReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ThirdReplacementColor) )
								colorArray[b] = ThirdReplacementColor;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.NeonGreen) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.NeonGreen) )
								colorArray[b] = VibrantColors.NeonGreen;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.OxylBlue) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.OxylBlue) )
								colorArray[b] = VibrantColors.OxylBlue;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Pink) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Pink) )
								colorArray[b] = VibrantColors.Pink;
							else //if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Brown) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Brown) )
								colorArray[b] = VibrantColors.Brown;
						else
							if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], SecondReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], SecondReplacementColor) )
								colorArray[b] = SecondReplacementColor;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], ThirdReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ThirdReplacementColor) )
								colorArray[b] = ThirdReplacementColor;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], FirstReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], FirstReplacementColor) )
								colorArray[b] = FirstReplacementColor;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.OxylBlue) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.OxylBlue) )
								colorArray[b] = VibrantColors.OxylBlue;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.NeonGreen) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.NeonGreen) )
								colorArray[b] = VibrantColors.NeonGreen;
							else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Brown) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Brown) )
								colorArray[b] = VibrantColors.Brown;
							else //if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Pink) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Pink) )
								colorArray[b] = VibrantColors.Pink;
				}
		}
		else
		{
			c = ColorArray.length / 2.;
			if ( Math.floor(c) != c )
				for (int a = 0; a < ColorArray.length; a++)
				{
					b = ColorArray.length - 1 - a;
					if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ColorArray[b]) )
						colorArray[b] = ColorArray[a];
					else
					{
						if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], FirstReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], FirstReplacementColor) )
							colorArray[b] = FirstReplacementColor;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], SecondReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], SecondReplacementColor) )
							colorArray[b] = SecondReplacementColor;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], ThirdReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ThirdReplacementColor) )
							colorArray[b] = ThirdReplacementColor;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.NeonGreen) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.NeonGreen) )
							colorArray[b] = VibrantColors.NeonGreen;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.OxylBlue) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.OxylBlue) )
							colorArray[b] = VibrantColors.OxylBlue;
						else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Pink) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Pink) )
							colorArray[b] = VibrantColors.Pink;
						else //if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Brown) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Brown) )
							colorArray[b] = VibrantColors.Brown;
					}
				}
			else for (int a = 0; a < ColorArray.length; a++)
			{
				b = ColorArray.length - 1 - a;
				if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ColorArray[b]) )
					colorArray[b] = ColorArray[a];
				else
					if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], FirstReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], FirstReplacementColor) )
						colorArray[b] = FirstReplacementColor;
					else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], SecondReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], SecondReplacementColor) )
						colorArray[b] = SecondReplacementColor;
					else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], ThirdReplacementColor) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], ThirdReplacementColor) )
						colorArray[b] = ThirdReplacementColor;
					else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.OxylBlue) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.OxylBlue) )
						colorArray[b] = VibrantColors.OxylBlue;
					else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.NeonGreen) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.NeonGreen) )
						colorArray[b] = VibrantColors.NeonGreen;
					else if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Brown) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Brown) )
						colorArray[b] = VibrantColors.Brown;
					else //if ( !colorTooSimilar.ColorTooSimilarFunction(ColorArray[b], VibrantColors.Pink) && !colorTooSimilar.ColorTooSimilarFunction(ColorArray[a], VibrantColors.Pink) )
						colorArray[b] = VibrantColors.Pink;
			}
		}
		return colorArray;
	}
	public int Length()
	{
		return colorArray.length;
	}
	public void set(Color[] ColorArray) { colorArray = ColorArray; }//14th Square DiagnosticsClass.java
	public Color[] get() { return colorArray; }
}