ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.81k stars 2.25k forks source link

Night mode changes too much #3512

Closed hssm closed 5 years ago

hssm commented 9 years ago

Originally reported on Google Code with ID 2624

What steps will reproduce the problem?
1. Use the attached deck or just put something like “color=#<3 or 6 hex digits>;” in
your card.
2. Review in night mode

What is the expected output? What do you see instead?
The card content is changed.
It should not be.

Does it happen again every time you repeat the steps above? Or did it
happen only one time?
Every time.

Paste the "debug info" from the AnkiDroid "About" dialog below (see the
above help webpage for detailed instructions).
AnkiDroid Version = 2.5alpha32

Android Version = 4.4.2

ACRA UUID = 43b14d00-fe66-46e2-a51e-2a69b75cd0a7

Please provide any additional information below.

The invertColors code,
https://github.com/ankidroid/Anki-Android/blob/develop/AnkiDroid/src/main/java/com/ichi2/themes/HtmlColors.java#L37-L82

just isn’t up to the task. I am for getting rid of this color inversion entirely.

See also issue “Night mode does not change enough”

Reported by ospalh on 2015-05-27 11:59:33


hssm commented 9 years ago
See also issue “Night mode does not change enough” --> i.e. issue 2625

Reported by perceptualchaos2 on 2015-05-28 02:27:02

hssm commented 9 years ago
Maybe there was a bit of confusion about what i am complaining here.
The color change is the idea.

What should of course not change is the text. The card is the same in both images.
Both should read "What does color=#f00; give.
By switching to night mode AnkiDroid *changed the text of the question*, replacing
f00 with 0ff. I find this much more unacceptable then rendering a card unreadable (issue
2625). There you see that there is a problem. Here AnkiDroid is acting like the Ministry
of Truth.

Reported by ospalh on 2015-05-28 10:27:53

hssm commented 9 years ago
Yes, I misunderstood your point the first time.  (I did think it odd when reading the
code that nothing was done to differentiate between text that /looks/ like a color
code, and text that is /used/ as a color code.)  I see now how an inverting overlay
prevents this problem.

Reported by yogamassage on 2015-05-28 15:25:52

hssm commented 9 years ago
While this is not really fixed, there is now a workaround:
Add special .night_mode{…} declarations to the card style and define your own night
mode colors.
Thanks, perceptualchaos2

Reported by ospalh on 2015-07-13 10:54:27