Hello, upon importing an .png sprite, the sprite in the engine has different color then the original.

On the left is the original image I created in Aseprite, on the right is the engine view. The import settings is set to lossless (Im using the default import settings)

Im using Godot 4.1
Any help is very much appreciated!

  • Tomcat replied to this.
  • Dejvik So is the solution to use the sRGB color profile in Aseprite and recolor it in a way that it looks like with the monitor color profile?

    Yeah.

    Try going to the Import Tab on the Resource when you click it and look for the sRGB option. Change it to Enable and Re-Import. (If it's on Detect and changing color, obviously it is not Detecting. Feel free to check Disable to see if this is the case.)
    And while you are at it, once you have this setting changed, click the Preset button by the file name and hit 2D Texture so you don't have to change this each time. (I'm on Godot 3.x but the process is the same)

    Hey, the import settings for the 4.X is a bit different, there is only the Channel Pack option, which has the "sRGB Friendly" and "Optimized" setting, I tried both, nothing changed

    Interesting. I wonder why they changed this?
    Worth opening a ticket on Github? I'll go ahead and do so.

    I have heard of some people having to re-code this directly in the source.

    Dejvik the sprite in the engine has different color then the original.

    Can you share the problematic image? Does Aseprite have a color profile?

    I suppose so, creating issue on Github was my first thought, but I wasnt really sure where to ask first for help, decided I will try here first. If you will create the ticket, first of all thank you, but should I then mark your answer as accepted?


    Here is the whole image. In aseprite, I tried to change the color mode from "RGB color" to "Indexed" and exporting that, but in the engine it had the same result, the colors were just slightly different, more saturated I guess.

    Pardon me, but I dont really know what color profile exactly means, but they have this section in their docs, I never touched any of that

      Dejvik Pardon me, but I dont really know what color profile exactly means

      In brief, a color profile allows programs to adjust colors so that images look the same in all programs and monitors. But if it is not set up, then the opposite result is obtained and images look different in different programs. Godot does not know how to correct colors.

      If you take a dropper in any editor (Krita or PS), you can make sure that colors are absolutely identical. They can be perceived slightly differently because of the background.

      • Godot editor
      • Godot game
      • Krita
      • Browser (Pale Moon)

      Calibrated monitor and configured programs and OS.

      Verdict: this is a color profile problem, Godot is not the culprit.

      I see. So in Aseprite, when changing the "Window Color Profile" from "Current Monitor Color Profile" to "sRGB Color Profile", the image inside of Aseprite now looks the same as in the engine view.

      So is the solution to use the sRGB color profile in Aseprite and recolor it in a way that it looks like with the monitor color profile?

        I tried opening the image in Affinity Photo, where the colors matched the Aseprite colors, so I assumed Its something with Godot way of importing the image. I did think of the difference of perceiving the colors differently on different background. Im sure the colors in Aseprite and Affinity Photo were the same, but Godot were slightly different.

        Dejvik So is the solution to use the sRGB color profile in Aseprite and recolor it in a way that it looks like with the monitor color profile?

        Yeah.

        Alright, will do. I dont think I could have figured this out by myself so thank you very much! :-)

        Well, just tried updating the colors on the sRGB profile in Aseprite and exporting that and now it looks the same between Aseprite and Godot, but looks different in Affinity, which has color profile already set as sRGB... So Im not sure this is the best way of doing this.

        I also found this issue in github, which is probably the exact same issue, without solution unfortunately. And in that case, I do think the issue is with Godot.
        Im not sure how to proceed, using the sRGB profile in Aseprite so it looks ok in Godot but wrong everywhere else is not ideal solution.

        I also found some more discussions where people suggested the same thing as @SnapCracklins where setting the sRGB to enabled in the import settings helped, but again. that was in 3.X version and is not present in the 4.X version.

          Dejvik Im not sure how to proceed

          The focus should be on the users. Players will run the game on their own hardware and should get the colors correct enough.

          Unfortunately, the problem of color transfer is relevant and in general does not have a universal solution. In the professional sector there is "end-to-end calibration" of equipment: monitor <–> OS <–> software <–> end equipment (displays in cinema and TV, printing in typography).

          On home devices, practically nobody will do it. So you should accept the impossibility to transfer the color accurately to household devices. The way out is to sharply narrow the used gamut, so that the colors would differ clearly.

          That issue you linked to could partially solve the problem, but:

          1. I believe it is quite difficult to implement;
          2. and requires a high level of skill (at least an understanding of the principles) to use it correctly.

          I mean I would expect the colors to be consistent on single machine... I understand every user will see it slightly differently, but on my own computer, If I draw something I would hope I can use exactly that image inside of the engine.

          Since it looks like there is no clear, ideal solution for this and there are opened issues, I suppose I will close this and hope it will get addressed in the future. I guess for now I will try using the sRGB profile in Aseprite, but I do see potential issues with that like I said above, importing the image into different software resulting in different colors.

          Anyway thanks for the help, it is much appreciated :-)

            Dejvik I mean I would expect the colors to be consistent on single machine...

            To do this, you have to calibrate your own computer with a monitor.

            monitor <–> OS <–> software

            Even if Godot will support color profiles — you still need to adjust them.

            As you can see, it looks the same to me, but I put some effort into it. And in general I came from the printing industry, so I calibrate everything by old habit, by default.

              Dejvik If I draw something I would hope I can use exactly that image inside of the engine

              Just disable any color management in your drawing app, and it will be so.