/// <summary>
        /// Same as TeleportTexturesGreyPartByPart but mixing 2 colored images instead. Using the same optimization
        /// It splits the image into smaller images, which can be progressed way faster and then puts them back together.
        /// Can sometimes have some slight errors  in images with big blocks of black pixels.
        /// Else it uses the same method of using teleportation to swap placed between the 2 images.
        /// Teleportation progress of 0 means no teleportation, Teleportation progress of 1 means the teleportation finished.
        /// And Teleportation progress of 0.5 means it is right in the middle.
        /// </summary>
        /// <param name="inputTexture">The first image which should be mixed.</param>
        /// <param name="inputTexture2">The second image which should be mixed.</param>
        /// <param name="teleportationProgress">How far the teleportation has progressed. 0 Not at all, 0.5 in the middle, 1 finished. Can take on any value between 0 and 1</param>
        /// <returns></returns>
        public Texture2D TeleportTexturesColoredPartByPart(Texture2D inputTexture, Texture2D inputTexture2, double mixture)
        {
            int dimX = 8;
            int dimY = 8;

            int width  = inputTexture.width;
            int height = inputTexture.height;

            if (inputTexture2.width < inputTexture.width || inputTexture2.height < inputTexture.height)
            {
                if (inputTexture2.width > inputTexture.width || inputTexture2.height > inputTexture.height)
                {
                    Debug.LogError("Can't find matching dimension.");
                    return(new Texture2D(width, height));
                }
                else
                {
                    Debug.LogWarning("Inputtexture 1 is too big only part of it will be used");
                    width  = inputTexture2.width;
                    height = inputTexture2.height;
                }
            }
            else if (inputTexture2.width > inputTexture.width || inputTexture2.height > inputTexture.height)
            {
                Debug.LogWarning("Inputtexture 2 is too big only part of it will be used");
            }

            if (width % 8 != 0)
            {
                Debug.LogWarning("Width not divisble by 8 sleighly cutting width (by " + width % 8 + ").");
                width = width - (width % 8);
            }

            if (height % 8 != 0)
            {
                Debug.LogWarning("Height not divisble by 8 sleighly cutting width (by " + height % 8 + ").");
                height = height - (height % 8);
            }

            int totalX = width / dimX;
            int totalY = height / dimY;


            int startX = 0;
            int startY = 0;

            double[,] redImageData    = new double[dimX, dimY];
            double[,] redImageData2   = new double[dimX, dimY];
            double[,] greenImageData  = new double[dimX, dimY];
            double[,] greenImageData2 = new double[dimX, dimY];
            double[,] blueImageData   = new double[dimX, dimY];
            double[,] blueImageData2  = new double[dimX, dimY];
            Texture2D OutputTexture = new Texture2D(width, height);

            string heightDimensions;

            IronPython.Runtime.PythonDictionary redDictionary, greenDictionary, blueDictionary;

            for (int i = 0; i < totalX; i++)
            {
                for (int j = 0; j < totalY; j++)
                {
                    double max1 = QuantumImageHelper.FillPartialHeightArray(inputTexture, redImageData, ColorChannel.R, startX, startY, dimX, dimY);
                    double max2 = QuantumImageHelper.FillPartialHeightArray(inputTexture2, redImageData2, ColorChannel.R, startX, startY, dimX, dimY);

                    redDictionary = getTeleportDictionaryFromData(out heightDimensions, redImageData, redImageData2, mixture, (1 - mixture) * max1 + mixture * max2);

                    max1 = QuantumImageHelper.FillPartialHeightArray(inputTexture, greenImageData, ColorChannel.G, startX, startY, dimX, dimY);
                    max2 = QuantumImageHelper.FillPartialHeightArray(inputTexture2, greenImageData2, ColorChannel.G, startX, startY, dimX, dimY);

                    greenDictionary = getTeleportDictionaryFromData(out heightDimensions, greenImageData, greenImageData2, mixture, (1 - mixture) * max1 + mixture * max2);

                    max1 = QuantumImageHelper.FillPartialHeightArray(inputTexture, blueImageData, ColorChannel.B, startX, startY, dimX, dimY);
                    max2 = QuantumImageHelper.FillPartialHeightArray(inputTexture2, blueImageData2, ColorChannel.B, startX, startY, dimX, dimY);

                    blueDictionary = getTeleportDictionaryFromData(out heightDimensions, blueImageData, blueImageData2, mixture, (1 - mixture) * max1 + mixture * max2);


                    QuantumImageHelper.FillTextureColored(redDictionary, greenDictionary, blueDictionary, OutputTexture, startX, startY);

                    startY += dimY;
                    startY  = startY % width;
                }
                startX += dimX;
            }

            OutputTexture.Apply();

            return(OutputTexture);
        }