- Home /
weird color or lighting bug in Unity?
Hi everyone!
There's something going on with an image on my canvas, it has a different color than it should be.
This image has an material that is set to the color White, but as you can see, it isn't. its a full dark image and I've been pulling my hair out that I couldn't fix it. is it a bug or did I do something wrong? In other scenes, the same thing happens with images, if the material is attached to for instance, a cube, it works as it should.
This image and this cube(background) both have the same material, but the image is fully dark. How can I fix this? Thanks!
Answer by Garazbolg · Jul 19, 2017 at 01:09 PM
You shouldn't be using the standard shader for UI elements. The standard shader use lighting, so without lights you object will be black.
For UI elements use a UI shader unless you know what you're doing with those shaders. Or even better stick to the default one, and just modify the color value in the Image component.
Your answer
![](https://koobas.hobune.stream/wayback/20220612130626im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Material doesn't have a color property '_Color' 4 Answers
Changing two different objects renderer colour 1 Answer
Accessing material.color removes the material... 1 Answer
Material color won't update! 2 Answers
What is the best way to implement the ability to allow multiple colors on a duplicated mesh? 1 Answer