OpenGL Vulkan color comparison

FF0064 and FF0063 could be a rounding error somewhere, also in the color picker?

No, it’s about different color profiles:

e.g. in this profile it is totally different:

2 Likes

I’ve never seen that before! Remarkable.

In any case, the issue to tackle first, I guess, is the difference in colour on the same screen?

1 Like

I can’t answer without investigation. More or less the same reason, but instead of profiles, it could be a color space or gamma correction issue or something similar.

2 Likes

I suppose we know this:

The issue is that colours are always muted when:

  • Bundling for HTML5
  • Vulkan is used (?)
1 Like

Testing this further reveals that the #FF0066 colour always turns into #EB3468 on web, including:

  • The body tag colour (nothing to do with Defold)
  • All elements in Defold (gui, sprite, model)

Because of this, I think the muted colours on HTML5 are unlikely to be a Defold issue. It seems more likely to be a generic issue to do with colour profiles (like @AGulev pointed out) or app specific settings - which would explain why it works as intended (the colour is honoured) inside Defold and when building the project inside Defold.

I think it would be nice to have an issue on GitHub with all the info and a repro case anyway.

I have already added an issue on GitHub for the difference openGL/Vulkan Inconsistent openGL / Vulkan colors · Issue #10276 · defold/defold · GitHub. Maybe the other info collected by @totebo about html could be added there.

2 Likes

Added some details to the git issue.

2 Likes

this happen due to mismatch of color profile in browsers.
to test it – Web browser color management test

How to “fix”:

  • in chromium based browsers set chrome://flags/#force-color-profile to sRGB
  • in firefox about:config set gfx.color_management.native_srgb to true
1 Like

Thanks! But the same problem happens also when running a project from the editor: there is a difference in using openGL and Vulkan? Also a color profile here… but how to set it?

Hm, the colors are identical on my mac M1. Are you using an external screen?

No, the colors are different on the built-in monitor of my iMac 27.