- Home /
The question is answered, right answer was accepted
Imported png doesn't keep colors
After imported png (which i want to use like a mask) colors of image are changed. I've been looking up of solution but still can't find it.
For now I changed in Project Settings->Other Settings->Color Space-> Gamma and change format of png to RGBA 32 bit.
But all these things just don't solve my problem. When I open my png in Paint and use pipette to pick up a color then the color is right/original/like it shoud be.
So, colors in my png is (rgb):
(0,0,0)
(1,0,0)
(2,0,0)
(3,0,0)
etc
Weirdly but after imported png to unity and using pipette to pick up color from place where original color is (4,0,0) a chosen pixel has (2,0,0) color. This is one example of a lot of difference in other colors. Fun fact is colors such as (0,0,0), (1,0,0), (2,0,0), (3,0,0), (5,0,0), (6,0,0), (7,0,0) are distinguished.
I can not attache image here because of size limit, however i upload image to outer website, link below:
https://ibb.co/Ms0MHYx
Have you got any ideas to import png and keeps original colors?
Target platform is Android
PS. I don't have any light in my scene
EDIT: I found a solution!
The problem is in Unity pipette. It's not working like pipette in for example Paint or Gimp. Unity creators didn't consider about display colors profiles. I'm working on Macbook and i have connected second monitor. Everything was clear for me when I moved instance of unity to my old screen where pippette works fine.
So everything what have we do is to change dislpay profile because pipette in Unity do not get original pixel color but a color mixed with display profile what is lame. After changed profile I can finally pick up right color but I have been thinking how it will be work in android. Screen below.
Answer by Naggil · Nov 20, 2019 at 04:39 PM
changing the format option under the sprite inspector to RGBA 32 bits will solve ur problem
I'm afraid this changing doesn't fix problem.
EDIT: Ups. Sorry, my mistake. I post wrong ss.. I changed that to RGBA 32 but still the same.
Follow this Question
Related Questions
Importing .png as a custom font in Unity 4.3 0 Answers
Error importing PNG: file could not be read 3 Answers
Heightmaps not importing properly 0 Answers
Textures weird transparency problem -- black lines on edges -- 2 Answers
Image - Actual Size / Unity Size 2 Answers