Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have color difference #48

Open
kane9527-e opened this issue Feb 14, 2023 · 24 comments
Open

Have color difference #48

kane9527-e opened this issue Feb 14, 2023 · 24 comments
Assignees

Comments

@kane9527-e
Copy link

kane9527-e commented Feb 14, 2023

1.Import xd file :https://drive.google.com/file/d/1LAmtfFHxfgmo15xldfqP9qzH8GD26wmf/view?usp=sharing
2. Observe the prefab and find that there is color difference with some elements in the XD file
Version: main
What is the reason for this? I don't quite understand. Please answer it, thank you!
f1e45408ddf18cd8b573c23bb9955cd

@ghost
Copy link

ghost commented Feb 14, 2023

@kyubuns, @kane9527-e, it looks like AkyuiUnity is brightening the UI when it is converting the .xd file to Unity.

@kyubuns
Copy link
Owner

kyubuns commented Feb 15, 2023

This problem is caused by AdobeXD not managing color profiles correctly.
https://adobexd.uservoice.com/forums/353007-adobe-xd-feature-requests/suggestions/17480899-color-management-set-color-profiles

I was left with the belief that AdobeXD would one day "normalize", but since I no longer expect AdobeXD to add new features
I am trying to figure out if this problem can be absorbed on the AkyuiUnity side, but the color profile issue is too complex to make any promises....

@ghost
Copy link

ghost commented Feb 15, 2023

@kyubuns, in all of the cases you have seen this bug, do all Akyui/Unity UI files look brighter than the original Xd files? If so, you could add a shading process while transforming the XD file.

@kyubuns
Copy link
Owner

kyubuns commented Feb 15, 2023

I am not yet aware of the whole issue and will investigate it in due time.

@ghost
Copy link

ghost commented Feb 15, 2023

I am not yet aware of the whole issue and will investigate it in due time.

@kyubuns, do you mind if I help you investigate this? If you create a repository with screenshots of several UIs in XD and the same UIs in Unity, I can look for any differences between the Unity prefabs and Xd files and give feedback on how the bug can be fixed. If you create a private repository, I will need to be invited as a collaborator if you want my help.

@ghost
Copy link

ghost commented Feb 15, 2023

I apologize if my previous comment had a rude tone; I edited it, so it would be less rude and more clear.

@kyubuns
Copy link
Owner

kyubuns commented Feb 16, 2023

I apologize if my previous comment had a rude tone; I edited it, so it would be less rude and more clear.

No, I appreciate your cooperation, I just don't know when I will be able to get started on this task.
And I don't want to leave unnecessary conversations on the issue.

@ghost
Copy link

ghost commented Feb 16, 2023

And I don't want to leave unnecessary conversations on the issue.

I meant that the conversation can be on the repository itself.

@ghost

This comment was marked as outdated.

@kane9527-e
Copy link
Author

Setting the SRGB as the monitor profile, this decision is bad. My team uses Windows and Mac together

@ghost
Copy link

ghost commented Feb 16, 2023

Never mind.

@ghost
Copy link

ghost commented Feb 16, 2023

@kyubuns, I could look into possibly installing Unity to help find a fix, but I'm not sure if my computer can handle a large game engine right now...

@ghost

This comment was marked as outdated.

@ghost

This comment was marked as outdated.

@ghost
Copy link

ghost commented Feb 18, 2023

@kyubuns, @kane9527-e, y'all can disregard my previous comments. I was doing more research, and I found that Akyui will need to limit its color gamut to sRGB, which is an international standard used by web browsers, Unity, and possibly other game engines. This means that the Xd -> Akyui conversion process will need to dull the Adobe RGB color space to sRGB, and the Akyui -> [game UI] conversion process will need to make adjustments to the UI colors, so the UI is compatible with Unity and other game engines. In a nutshell, unless a UI format using the sRGB space is used as the input format, or there is a new and wider color spectrum standard, there is no way to avoid unexpected UI color issues.

References:

@kane9527-e
Copy link
Author

Thank you for your answers, but due to the color problem, I can only temporarily give up using this scheme in the project, but I still thank the author and your contributions

@ghost
Copy link

ghost commented Feb 19, 2023

@kane9527-e, you are welcome; I am sorry that a permanent fix could not be found...

@ghost
Copy link

ghost commented Feb 19, 2023

@kyubuns, do you want me to add a warning about this issue in Pull Request #49?

@kyubuns
Copy link
Owner

kyubuns commented Feb 20, 2023

Thanks for doing the research.
I don't plan to write in the documentation until I close this PR, as people who are having problems should come to the Issue first.
When I myself really give up, this PR will be closed.

@ghost
Copy link

ghost commented Feb 20, 2023

Understood.

@ghost
Copy link

ghost commented Feb 20, 2023

If you want me to conduct more research, don't hesitate to let me know.

Repository owner deleted a comment Feb 21, 2023
@kane9527-e
Copy link
Author

Whether to consider adding linear space and gamma space to judge whether the color of the generated image is correct automatically according to the project settings or the options provided

@kane9527-e
Copy link
Author

Similar to shader code
#if !defined(UNITY_COLORSPACE_GAMMA) && (UNITY_VERSION >= 550)
o.color.rgb = GammaToLinearSpace(v.color.rgb);
o.color.a = v.color.a;
#endif

@ghost
Copy link

ghost commented Feb 23, 2023

Similar to shader code
#if !defined(UNITY_COLORSPACE_GAMMA) && (UNITY_VERSION >= 550)
o.color.rgb = GammaToLinearSpace(v.color.rgb);
o.color.a = v.color.a;
#endif

@kane9527-e I don't think Unity defines UNITY_COLORSPACE_GAMMA or UNITY_VERSION for the C# preprocessor. See the Unity docs for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants