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

Avatar color is sometimes not correct for some accounts in dark mode #2136

Closed
1 task done
Huy-Ngo opened this issue Apr 17, 2021 · 9 comments
Closed
1 task done

Avatar color is sometimes not correct for some accounts in dark mode #2136

Huy-Ngo opened this issue Apr 17, 2021 · 9 comments

Comments

@Huy-Ngo
Copy link

Huy-Ngo commented Apr 17, 2021

Avatars of some accounts are displayed inconsistently. They sometimes are displayed as a paler version. For instance, the FSF account whose avatar is red letters, appears pinkish white in the attached screenshot. Likewise, EFF's avatar appears with a pale red shade. Besides these two examples, I also have this on an account on librem.one instance, but I do not attach a screenshot here.

FSF avatar appears in wrong color
EFF avatar appears in wrong color


  • Tusky Version: Tusky Test 14.0-eea8b536

  • Android Version: 10QKQ1.190915.002

  • Android Device: Redmi Note 7 Pro

  • I searched or browsed the repo’s other issues to ensure this is not a duplicate.

@connyduck
Copy link
Collaborator

The weirdest bug o_0
Is it always on the same posts? Or is it random? Does it happen in timelines as well, or only on profiles?

@Huy-Ngo
Copy link
Author

Huy-Ngo commented Apr 18, 2021

Yes, indeed a weird bug. Since no one else reported this I suppose it could even be device-specific.

Is it always on the same posts? Or is it random?

Apparently they're always the same posts.

Does it happen in timelines as well, or only on profiles?

It happens on the timelines as well.

@Huy-Ngo
Copy link
Author

Huy-Ngo commented Apr 18, 2021

Also, it only happens in dark mode. I think this might be because of the transparency of the image, but that doesn't quite explain the inconsistency.

@Huy-Ngo Huy-Ngo changed the title Avatar color is sometimes not correct for accounts from different instance Avatar color is sometimes not correct for some accounts May 7, 2021
@Huy-Ngo Huy-Ngo changed the title Avatar color is sometimes not correct for some accounts Avatar color is sometimes not correct for some accounts in dark mode May 7, 2021
@Huy-Ngo
Copy link
Author

Huy-Ngo commented May 7, 2021

Update: This is not instance-related, but picture-specific.

I recent observed that two other accounts from my own instance has this issue, which makes it a bit less weird -- there is no reason the client would discriminate the instances. One of them uses grayscale image and the other uses a black and white image. Both of their avatars become negative image of the correct image. Another account with the same behavior is @xkcdbot, whose avatar is a white-lined stickman on black background, but appears as black-lined on white background on Tusky.

Adding to this weird visual behavior:

  • It occurs quite consistently (i.e. always happens) for the avatar of user who boosts.
  • It occurs inconsistently (i.e. not always happens) for posts, but when it happens, those specific posts are always affected.
  • Both timeline and profile views are affected, as mentioned above.
  • It only happens in dark mode, as mentioned above.
  • It never happens when I view the avatar in profile.

Here is my theory: at some point in rendering, a component detects the image as monocolor, and thinks it's text, therefore change the color for readability. Black-and-white color are therefore negative of itself, while other monocolor image (such as FSF and EFF red) are converted to be much very light. However, that does not explain the inconsistency.

@Huy-Ngo
Copy link
Author

Huy-Ngo commented May 30, 2021

Update: workaround found and worked: florisboard/florisboard#906 (comment)

It's a xiaomi issue. Feel free to close this issue if you think it doesn't need to be fixed.

@connyduck
Copy link
Collaborator

Ok, that is interesting. The thing is, I can probably not fix anything here because I don't have a Xiaomi phone. And even then it might be something that needs to be fixed in the image loading library we use and not in Tusky directly.

@mal0ki
Copy link
Member

mal0ki commented Nov 4, 2021

@connyduck is it something we'd like to send forward to the image loading library?
And should we close it here?

@charlag
Copy link
Collaborator

charlag commented May 10, 2022

I will close it as it is an issue in Xiaomi ROM

@charlag charlag closed this as completed May 10, 2022
@nicoduck
Copy link

For everyone also having this issue on Xiaomi ROMs: there's a switch in system settings, to "disable" dark mode per App. Dark mode still works in Tusky afterwards, but the image glitching is gone.
https://www.reddit.com/r/Xiaomi/comments/ls0mvh/dark_mode_making_dark_imagesui_elements_in_apps/goqe4nt

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

5 participants