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

font color for selected words differs between Android one one hand and Linux and WebAnki on the other hand #2603

Closed hssm closed 9 years ago

hssm commented 9 years ago

Originally reported on Google Code with ID 1701

What steps will reproduce the problem?
1. Use Anki client under Linux (Ubuntu 11.04): create a card with some words colored
differently than the default color using GUI "Set Foreground" dialog.
2. Sync to the web server. The colors of the words remain the same on web client as
under Linux.
3. Sync onto an Android device
4. The colors of the words change on Android (HTC Droid Incredible, CynogenMod 7.2.0).

What is the expected output? 

The colors of the words on flashcards on all devices should be the same

What do you see instead?

Linux,web  |  Android

blue       |  yellow
red        |  turquoise
yellow     |  blue
green      |  purple
purple     |  green
brown      |  brown
orange     |  blue
gris       |  gris
turquoise  |  red

Notice that if one looks in HTML source under Linux and Android the blue color is represented
as <font color="#0000FF"> as it should if RGB color model is used. But apparently something
else is used on Android and that hex is interpreted differently.

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

Always

What version of AnkiDroid are you using? (Decks list > menu > About > Look
at the title)

2.0.1

On what version of Android? (Home screen > menu > About phone > Android
version)

2.3.7

If it is a crash or "Force close" and you can reproduce it, the following
would help immensely: 1) Install the "SendLog" app, 2) Reproduce the crash,
3) Immediately after, launch SendLog, 4) Attach the resulting file to this
report. That will make the bug much easier to fix.

Please provide any additional information below.

Reported by igor.2004 on 2013-02-28 02:46:57

hssm commented 9 years ago
Does AnkiDroid destroy the colors (which means that afterwards they don't appear correctly
in Anki Desktop either) ?

Thanks for your feedback!

Reported by nicolas.raoul on 2013-02-28 02:49:16

hssm commented 9 years ago
No, the colors are not destroyed on Desktop. It does not look like Android is changing
html of the card but rather is interpreting the colors differently. I have attached
screenshots from Linux and Android to illustrate what I am talking about.

Reported by igor.2004 on 2013-02-28 16:09:57


hssm commented 9 years ago
You have night mode turned on. Go back one screen and turn it off. Either it'll be in
the menu as "Night mode" or in the top bar as a rectangle with a diagonal line going
through it, depending on device.

Reported by Houssam.Salem.Au on 2013-03-01 12:02:06

hssm commented 9 years ago
Yes, I prefer to work in night mode all the time. 
And yes: if one switches to day mode, the colors are correct. Still, I think it is
a bug that foreground colors change. It makes sense for black to change into white
but I would leave the rest of the colors unmodified.

So, I guees, currently the colors in the night mode are obtained using something like
xor with black?
#0000FF xor #FFFFFF = #FFFF00?

Reported by igor.2004 on 2013-03-01 15:22:35

hssm commented 9 years ago
This problem is still occurring as of 2.2alpha90.  The Chinese support plugin for desktop
Anki has a colour scheme that is inverted in night mode.

Reported by jjheik on 2014-06-16 21:55:42

hssm commented 9 years ago
A fix for my specific problem is as follows: 

Use CSS .mobile to specify *inverse* colours for ankimobile e.g.: 

.mobile .tone1 {color: #00ffff;}
.mobile .tone2 {color: #0028ff;}
.mobile .tone3 {color: #8303ff;}
.mobile .tone4 {color: #783105;}
.mobile .tone5 {color: #333333;}

That will work for night mode.

Reported by jjheik on 2014-06-21 17:04:58

hssm commented 9 years ago

Reported by Houssam.Salem.Au on 2015-04-13 12:06:14

cipri-tom commented 8 years ago

Is there an easy way to change or edit multiple cards in a deck?

eginhard commented 8 years ago

I'm not sure what you want to do. Change the font colour of multiple cards because you posted it here? You can do this via card templates.

For general questions like this I'd recommend to use the mailing group.

cipri-tom commented 8 years ago

I'm sorry I abused the bug tracker to ask newbie questions.

A shared deck I got has <font color="#0000FF"> in the actual field of the card, instead of using another field with a CSS tag. Because of this bug, cards get displayed differently in Anki-droid with night-mode ON than on the desktop and I cannot use the above fix, since the color is hard coded in the card.

I was wondering if you could suggest a way of accessing the cards so that I can edit out that text. If there's a way to export them to text and import back, then I can use text manipulation to fix the deck (500 cards).


Sorry, again, for using the bug tracker. I don't know why I unassigned ankidroid. I'm getting some error when trying to access the mailing group.

eginhard commented 8 years ago

AnkiDroid doesn't have such a functionality, but you can synchronise your cards to Anki Desktop and use its find and replace feature: http://ankisrs.net/docs/manual.html#find-and-replace

cipri-tom commented 8 years ago

Perfect! Thank you! πŸ‘ And sorry for the noise. I should've RTFM 😊