krmanik / Anki-xiehanzi

Learn, read, write and practice Mandarin by drawing strokes in Anki Desktop, AnkiDroid and AnkiMobile with audio of HSK 2.0 (HSK1-6) and HSK 3.0 (HSK 1-9) characters.
https://krmanik.github.io/Anki-xiehanzi
Other
157 stars 17 forks source link

Tone-colored drawing lines #25

Closed camerooncameroon closed 1 year ago

camerooncameroon commented 1 year ago

Is your feature request related to a problem? Please describe. Not a problem, feature suggestion.

Describe the solution you'd like To make the drawing color be also tone-specific (now black/white) like strokes are colored now depending on tones. You know, like if you are using colored ink to draw... So that the drawing and stroke colors are identical. That'd be great for memorizing tones together with already implemented color features.

Describe alternatives you've considered Tried to understand the code to enhance it in the above-mentioned way... but failed (

Additional context No additional context ATM

krmanik commented 1 year ago

The color is hard coded so may be in next update the it can be added to side bar menu till then change code of Card 5 in card templates.

https://github.com/krmanik/Anki-xiehanzi/blob/d6794a6501e45fc14d39a4b30e9a783e0ad26846/card%20templates/Card%205/front.html#L4-L28

camerooncameroon commented 1 year ago

@krmanik This piece of code is equal to what I have in my local card templates (card # 5) so I assume you are just pointing out where exactly the code should be played with )

From what I see, we can set different colors depending on char's tone (including neutral) by editing hex codes - they appear when we successfully entered the hanzi or revealed it by tapping the button. (That's really great enhancement by the way!)

IMHO: I'm not really sure this control shall be included in the UI as usually these colors are set personally but once and forever. So, editing template by hand won't be a hassle. /end of IMHO )

Obviously, I put my suggestion incorrectly, what I meant was drawing color (the color which virtually 'comes out' from your stylus or fingertip when drawing the hanzi) - is it possible to make it tone dependent? So that when you draw 3rd tone hanzi - your lines will be colored as it's set for this tone. Like currently the final appearance of the entered hanzi is (different color based on hanzi's tone).

The desired effect is such, that when you try to draw (even incorrectly), you already see the tone's corresponding color in your own writing and memorize the tone already (now these lines and curves are black in daymode and white in nightmode).

And when the hanzi is successfully entered, it also appears in the same "tone color", thus confirming the memorizing effect (the latter is already implemented).

PS. Also as I noted, the handwritten hanzi tone colors can't be currently varied depending on day/night mode?

PS2. in other words: is it possible to assign the resulting color from function getToneColor(char) not only to the stroke_color but also to the drawing_color?