Downloaded sprite texture gets white tint

When I use the following code to download a .jpg or .png image from my server, it appears in Unity as being heavily tinted to whatever color is set in the inspector for the UI image. It was my understanding that using the values 255 255 255 255 would apply no tint. See code, see image.

private IEnumerator LoadImage()
{
Texture2D temp = new Texture2D(0,0);
WWW www = new WWW(“https://bigfatsimulations.com/tmp/am3d2_available/newGameImage.jpg”);
yield return www;

temp = www.texture;
Sprite sprite = Sprite.Create(temp, new Rect(0,0,temp.width, temp.height), new Vector2(0.5f,0.5f));
Transform thumb = transform;
thumb.GetComponent().sprite = sprite;
}

Others have this issue:

I opened a new project and the image loads perfectly. In my main project however, the downloaded image appears white tinted in the UI Image.

I have the same problem, any solution?

Is your project set to linear Color space? then the www class is expecting linear textures from you but your are giving it gamma space images.
If you import the same texture inside the editor unity does expect that the most images you supply are gamma space except if you tell it is not (by unchecking the sRGB (Color Texture) checkbox in the texture importer settings).

Hi! I just found a solution that works for me.

When you just download the image with WWW, just create a new texture2D with the widht and height of the text downloaded and fill with the data of it. Select the texture format of your choose, midmaps, and the last parameter are if the image is linear or gamma, play with this parameter changing it.

There is an example:
Texture2D textureToFill = new Texture2D(temp.texture.width, temp.texture.height,TextureFormat.RGB24,false, false);
textureToFill.LoadImage(temp.bytes);
Sprite sprite = Sprite.Create (textureToFill, new Rect (0, 0, textureToFill.width, textureToFill.height), Vector2.zero);