swatchr icon indicating copy to clipboard operation
swatchr copied to clipboard

Inaccurate colors in editor when using Linear color space

Open Manamongods opened this issue 4 years ago • 3 comments

Linear Gamma

Manamongods avatar Feb 09 '21 16:02 Manamongods

Is it just the Inspector window thats wrong? I imagine it's "right" in the game itself?

Also, I see some of the grid cells dont line up perfectly. Are you on a 4k monitor? Mac? Windows?

jknightdoeswork avatar Feb 09 '21 21:02 jknightdoeswork

Yeah it's only in the editor I'm on windows 10, Unity 2020.2.2f1, 1080p monitor Changing the scaling to be 100% did make the grid cells line up image image

Manamongods avatar Feb 09 '21 22:02 Manamongods

Change the last bool from true to false. This will change the color space for the texture from linear to sRGB and the colors will be displayed correctly.

https://github.com/jknightdoeswork/swatchr/blob/cbc5cc5779bb8db63978956f4a44b51235a70cb3/swatchr/Editor/SwatchrPaletteDrawer.cs#L255

PhiSel avatar Feb 25 '21 14:02 PhiSel