Hey, I encountered a pretty weird bug while working with averaging colors. The color rgb values clearly show that the color should appear primarily blue, which is also reflected by the hex code. But ingame, the dark green you can see in the top right is showing up and i have no idea why. Does anyone have experience with this kind of behaviour and knows how to solve it?
The Material of the sprite is using a ShaderGraph, which shouldn’t change the color though, see the screenshot below. The assigned color for ContentsColor also is the wrong color (the dark green). Also, the color I’d expect to come out is the blue the hex code represents.
Also, i wouldn’t expect the main question I’m interested in (“Why are rgb values and hex code showing a blue color, but the preview in the top right a green one?”) to depend on the context I’m working in, but i might be fundamentally misunderstanding something about Unity’s color system.
As above, you don’t provide any context on what this is being used on. If it’s a SpriteRenderer (you tagged this as 2D-graphics) then that’s not an absolute color, it’s a color “tint” so it depends on the color of the original texture.
Your original sprite/texture should be white to give you exactly what you selected here.
Yeah, sorry. I didn’t include context because my question was mainly focused on the color panel. Why are hex code and preview (top right) showing different colors? I’ve edited the main post to include some additional informations
the color switcher is sometimes wacky and might not reflect what is actually happening, instead, use debug logs and look at the actual color ingame, take a printscreen and open it in photoshop
these are just some tips for you to debug this
now if its all good it might just be a case of color swatcher is sometimes buggy when used as an interface, but the code underneath is solid