jknightdoeswork / swatchr

A color palette management system for Unity
MIT License
110 stars 15 forks source link

Inaccurate colors in editor when using Linear color space #4

Open Manamongods opened 3 years ago

Manamongods commented 3 years ago

Linear Gamma

jknightdoeswork commented 3 years ago

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?

Manamongods commented 3 years ago

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

PhiSel commented 3 years ago

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