a black image's color can not be changed in Unity -


the color of black image , or black part of image, can not changed. example

i set image's color red, image still black.

is desired feature?

what want , image changed red.

the unity version 5.0.1f. using new ui.

to understand source of problem, have understand how "changing colors" work. it's nothing simple multiplication. in rgb terms, "black" vector of (0, 0, 0) — , it's pretty obvious, whatever multiply 0 by, stays black.

if want template image able change color, use white.

to modify colours in more complex way, have understand how color property of image component works. ui system hides lot of complexity underneath (and it's good). basically, color modifies vertex colours of mesh. since don't specify material, default sprite material used, , uses default sprite shader. , inside shader, when paints pixels on screen, multiplies vertex colours texture colour sampled @ pixel, , that's how produces end result. if want colours combined in different way, you'll have write custom shader — not hard, don't need you're trying in scope of question.


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -