Page MenuHomePhabricator

Background color of elements is not preserved in dark mode.
Closed, ResolvedPublic


  1. Go to the national assembly of Pakistan article.
  2. Tap quick facts.
  3. Observe the colored boxes do not show as they should.


Event Timeline

Niedzielski raised the priority of this task from to Needs Triage.
Niedzielski updated the task description. (Show Details)
Niedzielski added subscribers: Niedzielski, Aklapper.
Dbrant renamed this task from Color boxes in quick facts don't render to Background color of elements is not preserved in dark mode..Jul 1 2015, 2:46 PM
Dbrant triaged this task as Normal priority.
Dbrant set Security to None.
Dbrant moved this task from Needs Triage to Bug Backlog on the Wikipedia-Android-App-Backlog board.
Dbrant added a subscriber: Dbrant.Jul 29 2015, 2:43 PM

This is because we actually strip out all background colors from table elements when we go into dark mode.
Idea: instead of stripping the color, we can try modifying the "brightness" of the color to be darker, e.g. (r/2, g/2, b/2).

Mholloway claimed this task.Aug 3 2015, 7:33 PM
Mholloway moved this task from To Do to Doing on the Mobile-App-Sprint-63-Android-Europium board.

Here's a screenshot with RGB values halved (rather than stripped) for table element backgrounds.

The good news is that it looks fine in general; the bad news is, as is the case here, this can also change meaning; the colors in the key (which we've just restored) no longer match up to the seats in the diagram.

This is more like it on the halving. What do you think?

Change 228989 had a related patch set uploaded (by Mholloway):
Halve RGB values of background colors in tables in night mode

Change 228989 merged by jenkins-bot:
Halve RGB values of background colors in tables in night mode

Signed off by design (QA to test for additional cases)

Checked with 2.0.108-alpha-2015-08-12 on Nexus5(Android 5.1)
Samsung Tablet Ce0168(Android 4.0.4)

The 'Quick facts' for the national assembly of Pakistan article are displayed as in the screenshot by @Mholloway.

Checked on other articles with the same Quick facts structue with colorbox(es)-National Assembly (South Korea), Scottish Parliament, National Assembly of Quebec(no colorbox ).