Quick Colour Changing
<10kB. Updated 2022-07-24.
The author has shared 13 other
item(s).
Description
Download
As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.
Supported Anki versions:
- 2.1.0-2.1.54+ (Updated 2022-07-24)
To download this add-on, please copy and paste the following code into Anki 2.1:
2491935955
If you were linked to this page from the internet, please open Anki on your computer, go to the Tools->Add-ons menu item, then click on Get Add-ons and paste in the code.
All Anki 2.1.x Add-Ons Contact Author
Reviews

Very convenient!

Works great

{
"keys": [
[
"black",
"Alt+x"
],
[
"red",
"Alt+r"
],
[
"green",
"Alt+g"
],
[
"blue",
"Alt+b"
]
]
}
"keys": [
[
"black",
"Alt+x"
],
[
"red",
"Alt+r"
],
[
"green",
"Alt+g"
],
[
"blue",
"Alt+b"
]
]
}

Scroll down for a set up you can copy and edit your preferred setup.
I am using this, the colors are mine, but the code I got from another comment.
{
"keys": [
[
"#9aff4c",
"F1"
],
[
"#ffc85a",
"F2"
],
[
"#ffff7f",
"F11"
],
[
"#eeb9ff",
"F12"
],
[
"#848484",
"F4"
],
[
"#b5ffda",
"F3"
]
]
}
Restart to make it work.
I am using this, the colors are mine, but the code I got from another comment.
{
"keys": [
[
"#9aff4c",
"F1"
],
[
"#ffc85a",
"F2"
],
[
"#ffff7f",
"F11"
],
[
"#eeb9ff",
"F12"
],
[
"#848484",
"F4"
],
[
"#b5ffda",
"F3"
]
]
}
Restart to make it work.

Thank you, saved lots of my time!

There is one issue with this, I cannot change color of text that was Copy and paste to the anki
:(( how to solve this ?
:(( how to solve this ?

Amazing. Should be integrated into the core Anki build, imo.

This add-on is a life saver, but I am encountering an issue where any text color set by the add-on will ignore the text-decoration-color I have set in my cloze card type. This issue does not occur if I use the built in Anki text editor to select the color, only when I use the shortcut from this add-on.
I typically have many clozes per note, and all of them are colored differently based on the type of fact I am trying to learn. However, given all the colored text, I find it helpful to keep the cloze underlined in a different color after flipping the card. I would like this underline color to maintain the color of the initial cloze, not the color of the text itself after it has been flipped.
I typically have many clozes per note, and all of them are colored differently based on the type of fact I am trying to learn. However, given all the colored text, I find it helpful to keep the cloze underlined in a different color after flipping the card. I would like this underline color to maintain the color of the initial cloze, not the color of the text itself after it has been flipped.

Perfect addon. The F11 key works completely fine for me on Anki 2.1.54 -- if you're having trouble with that maybe you need to change some settings.

Why can't I use the F11 key?
I have just Anki 2.1.54 with this addon (no other addons) with the default configuration, and steel pressing F11 has no effect (F12 works OK).
I can customize and use Ctrl+F11, which works well, but F11 alone is a different story: it can't use it, and I don't know why.
I have just Anki 2.1.54 with this addon (no other addons) with the default configuration, and steel pressing F11 has no effect (F12 works OK).
I can customize and use Ctrl+F11, which works well, but F11 alone is a different story: it can't use it, and I don't know why.

doesn't work

Essential for me, use it constantly, saves so much time. Works fine on 2.1.51.

Works well. Wish it worked with edit fields while reviewing

It's working on 2.49, but isn't on 2.5
Hope you'll update, your add-on helps me a lot.
Hope you'll update, your add-on helps me a lot.

Doesn't work on Anki 2.1.49
Anki 2.1.49 (dc80804a) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-03-24 21:53:27
Caught exception:
Traceback (most recent call last):
File "aqt\webview.py", line 41, in cmd
File "aqt\webview.py", line 142, in _onCmd
File "aqt\webview.py", line 595, in _onBridgeCmd
File "aqt\toolbar.py", line 168, in _linkHandler
File "aqt\toolbar.py", line 186, in _browseLinkHandler
File "aqt\main.py", line 1119, in onBrowse
File "aqt\__init__.py", line 116, in open
File "aqt\browser\browser.py", line 132, in __init__
File "aqt\browser\browser.py", line 416, in setupEditor
File "aqt\editor.py", line 116, in __init__
File "aqt\editor.py", line 308, in setupShortcuts
File "aqt\hooks_gen.py", line 1921, in __call__
File "anki\hooks.py", line 34, in runHook
File "C:\Users\OWNER\AppData\Roaming\Anki2\addons21\2491935955\__init__.py", line 19, in onSetupShortcuts
for code, key in config['keys']:
ValueError: not enough values to unpack (expected 2, got 0)
This is my init.py:
# -*- coding: utf-8 -*-
# Copyright: Damien Elmes <anki@ichi2.net>
# License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html
#
from aqt import mw
config = mw.addonManager.getConfig(__name__)
from anki.hooks import addHook
def updateColour(editor, colour):
editor.fcolour = colour
editor.onColourChanged()
editor._wrapWithColour(editor.fcolour)
def onSetupShortcuts(cuts, editor):
# add colours
for code, key in config['keys']:
cuts.append((key, lambda c=code: updateColour(editor, c)))
addHook("setupEditorShortcuts", onSetupShortcuts)
This error message also pops up when I attempt to change the colors:
Anki 2.1.49 (dc80804a) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-03-24 21:53:27
Caught exception:
Traceback (most recent call last):
File "aqt\taskman.py", line 101, in _on_closures_pending
File "aqt\taskman.py", line 71, in <lambda>
File "aqt\taskman.py", line 90, in wrapped_done
File "aqt\operations\__init__.py", line 117, in wrapped_done
File "aqt\operations\__init__.py", line 136, in _fire_change_hooks_after_op_performed
File "aqt\hooks_gen.py", line 2859, in __call__
File "aqt\browser\browser.py", line 148, in on_operation_did_execute
AttributeError: 'Browser' object has no attribute 'editor'
This is my Meta.json:
{"name": "Quick Colour Changing", "mod": 1503924482, "min_point_version": 0, "max_point_version": 15, "branch_index": 0, "config": {"keys": [["#a4a4ff", "Alt+1"], ["red", "Alt+2"], ["green", "Alt+3"], ["orange", "Alt+4"]]}, "disabled": false, "conflicts": [], "update_enabled": true}
Behaviour:
When I press Alt+1 or Alt+2, nothing happens.
When I press Alt+3 or Alt+4, it works as expected.
Changing Alt+1 or Alt+2 to something else doesn't work.
Changing the color of Alt+3 from Green to Red for example, doesn't change. It stays Green.
Anki 2.1.49 (dc80804a) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-03-24 21:53:27
Caught exception:
Traceback (most recent call last):
File "aqt\webview.py", line 41, in cmd
File "aqt\webview.py", line 142, in _onCmd
File "aqt\webview.py", line 595, in _onBridgeCmd
File "aqt\toolbar.py", line 168, in _linkHandler
File "aqt\toolbar.py", line 186, in _browseLinkHandler
File "aqt\main.py", line 1119, in onBrowse
File "aqt\__init__.py", line 116, in open
File "aqt\browser\browser.py", line 132, in __init__
File "aqt\browser\browser.py", line 416, in setupEditor
File "aqt\editor.py", line 116, in __init__
File "aqt\editor.py", line 308, in setupShortcuts
File "aqt\hooks_gen.py", line 1921, in __call__
File "anki\hooks.py", line 34, in runHook
File "C:\Users\OWNER\AppData\Roaming\Anki2\addons21\2491935955\__init__.py", line 19, in onSetupShortcuts
for code, key in config['keys']:
ValueError: not enough values to unpack (expected 2, got 0)
This is my init.py:
# -*- coding: utf-8 -*-
# Copyright: Damien Elmes <anki@ichi2.net>
# License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html
#
from aqt import mw
config = mw.addonManager.getConfig(__name__)
from anki.hooks import addHook
def updateColour(editor, colour):
editor.fcolour = colour
editor.onColourChanged()
editor._wrapWithColour(editor.fcolour)
def onSetupShortcuts(cuts, editor):
# add colours
for code, key in config['keys']:
cuts.append((key, lambda c=code: updateColour(editor, c)))
addHook("setupEditorShortcuts", onSetupShortcuts)
This error message also pops up when I attempt to change the colors:
Anki 2.1.49 (dc80804a) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-03-24 21:53:27
Caught exception:
Traceback (most recent call last):
File "aqt\taskman.py", line 101, in _on_closures_pending
File "aqt\taskman.py", line 71, in <lambda>
File "aqt\taskman.py", line 90, in wrapped_done
File "aqt\operations\__init__.py", line 117, in wrapped_done
File "aqt\operations\__init__.py", line 136, in _fire_change_hooks_after_op_performed
File "aqt\hooks_gen.py", line 2859, in __call__
File "aqt\browser\browser.py", line 148, in on_operation_did_execute
AttributeError: 'Browser' object has no attribute 'editor'
This is my Meta.json:
{"name": "Quick Colour Changing", "mod": 1503924482, "min_point_version": 0, "max_point_version": 15, "branch_index": 0, "config": {"keys": [["#a4a4ff", "Alt+1"], ["red", "Alt+2"], ["green", "Alt+3"], ["orange", "Alt+4"]]}, "disabled": false, "conflicts": [], "update_enabled": true}
Behaviour:
When I press Alt+1 or Alt+2, nothing happens.
When I press Alt+3 or Alt+4, it works as expected.
Changing Alt+1 or Alt+2 to something else doesn't work.
Changing the color of Alt+3 from Green to Red for example, doesn't change. It stays Green.

It is very easy to use and saves time.

Great

Good time saver
Edit: As a head's up, it doesn't seem to work with Anki 2.1.50 beta
Edit: As a head's up, it doesn't seem to work with Anki 2.1.50 beta

good

USING IN RAPID REVIEW AND BROWSER
This app is very useful, but the color changing shortcuts are not working in the quick-edit card section in the card browser. If this would work in that section, I would gladly rate it 5 stars. The shortcuts will work in review and browser
This app is very useful, but the color changing shortcuts are not working in the quick-edit card section in the card browser. If this would work in that section, I would gladly rate it 5 stars. The shortcuts will work in review and browser

Good add on

Very convenient thanks

Great, thanks a lot!

If you are using this plugin on a Mac, be sure to pay attention to the configuration file, Ctrl will map to Command, Meta will map to Ctrl. The following is from PyQt's documentation
On macOS, references to “Ctrl”, CTRL , Key_Control and ControlModifier correspond to the Command keys on the Macintosh keyboard, and references to “Meta”, META , Key_Meta and MetaModifier correspond to the Control keys. Developers on macOS can use the same shortcut descriptions across all platforms, and their applications will automatically work as expected on macOS.
https://doc.qt.io/qtforpython-5/PySide2/QtGui/QKeySequence.html#more
On macOS, references to “Ctrl”, CTRL , Key_Control and ControlModifier correspond to the Command keys on the Macintosh keyboard, and references to “Meta”, META , Key_Meta and MetaModifier correspond to the Control keys. Developers on macOS can use the same shortcut descriptions across all platforms, and their applications will automatically work as expected on macOS.
https://doc.qt.io/qtforpython-5/PySide2/QtGui/QKeySequence.html#more

Godsend!! 😋
I use it daily, each time I write a new card, as I like to make additional information surrounded by parentheses to be of gray colour.
I use it daily, each time I write a new card, as I like to make additional information surrounded by parentheses to be of gray colour.

Thanks very much for the Add-on! I use it a lot and it saves a huge amount of time.

this works like charm, as I'm already used to this in other program ,which is assign short cut key to high light text with certain color. I'm disappointed to see most downvotes comes from the people who didn't bother to spend time examining how to use it in the first place.

Should be implemented in Anki
Must have add-on
Must have add-on

Great work! The user must be careful to use shotcuts that won't affect the normal functions of anki (or other addons).
My keys:
{
"keys": [
[
"black",
"Alt+1"
],
[
"red",
"Alt+2"
],
[
"green",
"Alt+3"
],
[
"blue",
"Alt+4"
]
]
}
My keys:
{
"keys": [
[
"black",
"Alt+1"
],
[
"red",
"Alt+2"
],
[
"green",
"Alt+3"
],
[
"blue",
"Alt+4"
]
]
}

This allows me to modify font color along with colors of Anki iOS edition much more easily!
I referred to another fan's configuration, and slightly modified key assign to work in Anki 2.1.22 as below.
(*) Shift+Ctrl+r, Shift+Ctrl+e didn't work in my environment.
{
"keys": [
[ "#0a84ff", "Shift+Ctrl+b" ],
[ "#30d158", "Shift+Ctrl+g" ],
[ "#ff9f0a", "F11" ],
[ "#ff453a", "F12" ]
]
}
------
It worked on Windows 10 and Linux (Fedora).
It needs restart of Anki to make changes take effect.
I referred to another fan's configuration, and slightly modified key assign to work in Anki 2.1.22 as below.
(*) Shift+Ctrl+r, Shift+Ctrl+e didn't work in my environment.
{
"keys": [
[ "#0a84ff", "Shift+Ctrl+b" ],
[ "#30d158", "Shift+Ctrl+g" ],
[ "#ff9f0a", "F11" ],
[ "#ff453a", "F12" ]
]
}
------
It worked on Windows 10 and Linux (Fedora).
It needs restart of Anki to make changes take effect.

effective

Really a pitty that F3 doesn't work.
Besides that an absolutely great tool. If it doesn't work at all for for you, try restarting Anki.
Besides that an absolutely great tool. If it doesn't work at all for for you, try restarting Anki.

simple, works great on Mac OS on both Browser and in Add mode, you just have to restart after editing the shortcuts. I use:
{ "keys": [ [ "green","Alt+x" ], [ "blue", "Alt+z" ], [ "orange", "Alt+a" ], [ "black", "Alt+s" ] ] }
{ "keys": [ [ "green","Alt+x" ], [ "blue", "Alt+z" ], [ "orange", "Alt+a" ], [ "black", "Alt+s" ] ] }

nice!

Super! It really helped me to save time (4000+ cards lol). I used it for colour-coding my german deck (by gender), so I remember the words with an specific colour depending on its gender.

Great add-on. Also looking for an add-on where the multiple colors show up on top of the adding/editing screen of a card. Nonetheless this works

Such a time saver! Thanks for the work on this one :)

Once you enter the html in 'settings' in 'add ons' (assign colours the keyboard shortcut), you have to close and reopen anki for the changes to take effect.

If it doesn't work, you could try restarting.

For anyone interested, I synced the colors with the iOS app for working with the Black background on the phone. These are the same colors the app uses (Using regular Blue was an issue, I just adapted all of them).
The order is: Blue, Green, orangE, Red
„Shift+Cmd+b/g/e/r“ (Cmd is written as Ctrl, see below).
Thanks to those who developed this and those who commented below!
{
"keys": [
[
"#0a84ff",
"Shift+Ctrl+b"
],
[
"#30d158",
"Shift+Ctrl+g"
],
[
"#ff9f0a",
"Shift+Ctrl+e"
],
[
"#ff453a",
"Shift+Ctrl+r"
]
]
}
The order is: Blue, Green, orangE, Red
„Shift+Cmd+b/g/e/r“ (Cmd is written as Ctrl, see below).
Thanks to those who developed this and those who commented below!
{
"keys": [
[
"#0a84ff",
"Shift+Ctrl+b"
],
[
"#30d158",
"Shift+Ctrl+g"
],
[
"#ff9f0a",
"Shift+Ctrl+e"
],
[
"#ff453a",
"Shift+Ctrl+r"
]
]
}

Would be awesome to also make it work with "edit while reviewing" add-on is that possible ?

nice

Excellent in editor mode; however, it would be awesome if you could make this compatible with the edit field during cloze review/image resizer add-on. Thanks for your work!

Does not work in the browser

I love this a lot! Making text transparent is now so much easier
P.S. although I love the addon, I think overwriting the F8 button is a bad idea.
Even if you set the shortcut to something else the F8 button will not return doing its usual job because of the addon.
Fixing it is very easy though
Here's how: https://imgur.com/a/jJYKnoi
P.S. although I love the addon, I think overwriting the F8 button is a bad idea.
Even if you set the shortcut to something else the F8 button will not return doing its usual job because of the addon.
Fixing it is very easy though
Here's how: https://imgur.com/a/jJYKnoi

Very helpful in quick entering while doing courses, reading new vocabulary that need to highlight colors

works well for me...
but saw in the review section some having troubles with adding more than 2 colors, hope the following steps will help( windows 10 anki 2.1 version)
1)after adding the add on , go to the tools -> add-ons -> select the quick color changing -> click config -> then on the configuration window:
it should look like this:
{
"keys": [
[
"red",
"F11"
],
[
"#00f",
"F12"
]
]
}
2) to add more colors or to change the controls:
a) keep the beginning and ending tags intact
beginning tags { "keys": [
ending tags ] }
b) then can edit in between - it was easier for me to use ctrl+ alt keys together as controls
["red", "F11" ], u can change it to ["red","Ctrl+Alt+r" ],
[ "#00f", "F12"] u can change it to ["blue","Ctrl+Alt+b"],
c) to add a color of your choice:
go to anki add page -> change color button or F8 -> in the 'select color' window look for the HTML code for the color and copy it. then you can use it to customize
ex:for purple
["#aa00ff","Ctrl+Alt+p"],
d) you can keep on adding colors and controls of your choice.
*in between 2 color commands there should be a comma and in the last color command no comma is required
ex:
{
"keys": [
["red","Ctrl+Alt+r"],
["blue","Ctrl+Alt+b"],
["#ff00ff ","Ctrl+Alt+x"]
]
}
or you can copy paste the following and edit it as you want -> if it doesn't work go for restore defaults
{
"keys": [
["red","Ctrl+Alt+r"],
["blue","Ctrl+Alt+b"],
["#00ff00","Ctrl+Alt+g"],
["yellow","Ctrl+Alt+y"],
["#aa00ff","Ctrl+Alt+p"],
["#ffaa00","Ctrl+Alt+o"],
["#55aaff","Ctrl+Alt+n"],
["#ff557f","Ctrl+Alt+z"],
["#ff00ff ","Ctrl+Alt+x"]
]
}
e) restart the anki app
but saw in the review section some having troubles with adding more than 2 colors, hope the following steps will help( windows 10 anki 2.1 version)
1)after adding the add on , go to the tools -> add-ons -> select the quick color changing -> click config -> then on the configuration window:
it should look like this:
{
"keys": [
[
"red",
"F11"
],
[
"#00f",
"F12"
]
]
}
2) to add more colors or to change the controls:
a) keep the beginning and ending tags intact
beginning tags { "keys": [
ending tags ] }
b) then can edit in between - it was easier for me to use ctrl+ alt keys together as controls
["red", "F11" ], u can change it to ["red","Ctrl+Alt+r" ],
[ "#00f", "F12"] u can change it to ["blue","Ctrl+Alt+b"],
c) to add a color of your choice:
go to anki add page -> change color button or F8 -> in the 'select color' window look for the HTML code for the color and copy it. then you can use it to customize
ex:for purple
["#aa00ff","Ctrl+Alt+p"],
d) you can keep on adding colors and controls of your choice.
*in between 2 color commands there should be a comma and in the last color command no comma is required
ex:
{
"keys": [
["red","Ctrl+Alt+r"],
["blue","Ctrl+Alt+b"],
["#ff00ff ","Ctrl+Alt+x"]
]
}
or you can copy paste the following and edit it as you want -> if it doesn't work go for restore defaults
{
"keys": [
["red","Ctrl+Alt+r"],
["blue","Ctrl+Alt+b"],
["#00ff00","Ctrl+Alt+g"],
["yellow","Ctrl+Alt+y"],
["#aa00ff","Ctrl+Alt+p"],
["#ffaa00","Ctrl+Alt+o"],
["#55aaff","Ctrl+Alt+n"],
["#ff557f","Ctrl+Alt+z"],
["#ff00ff ","Ctrl+Alt+x"]
]
}
e) restart the anki app

Great. Thanks!
For those who'd like to have (say) four colours, the easiest way to do so is by opening the Addon list, select View Files, duplicate the folder in question, and restart Anki.
For those who'd like to have (say) four colours, the easiest way to do so is by opening the Addon list, select View Files, duplicate the folder in question, and restart Anki.

works good. Thank you!

Thanks!

ok

用不了

Very nice app, but I can not figure out how to add more than 2 colours.
I can change the 2 colours the default setting came with and the hotkeys, but if I try to add more code I just end up with error.
I can change the 2 colours the default setting came with and the hotkeys, but if I try to add more code I just end up with error.

It can mark some important informations with different colours

Works for me!

你好,如果在此基础上,增加设置文字加粗设置就好了。如按一个组合快捷键alt+z,就可设置颜色红色并加粗。如果能实现,那太棒了。
为什么有此需求呢?为了更加突出。
为什么有此需求呢?为了更加突出。

l can't even open it .Is it my computer's problem?My anki's vension is 2.1.

添加插件后,需选择“工具”,“附加组件”,选中“Quick Colour Changing”,点击“设置”,可以更改快捷键和颜色,会有提示,希望帮助到你.
After adding the plugin, you need to select "Tools", "Add-ons", select "Quick Colour Changing", click "Config", you can change the shortcut keys and colors, there will be tips, I hope it can help you.
After adding the plugin, you need to select "Tools", "Add-ons", select "Quick Colour Changing", click "Config", you can change the shortcut keys and colors, there will be tips, I hope it can help you.

这玩意怎么用啊,半天 添加不了 新颜色。

I really have no idea how to use it. No option to apply it anywhere at all! Please write instructions, it'd be of great help.

I have no idea how to make this program work. There is no explanation, no screenshots, nothing. I assume these are supposed to work in the edit/create screen for new cards but after 30min, I'm giving up on trying to make it work. If this is the "quick" way to change colors, I don't want to know what the slow way is.

Anki 2.1 version works as expected. I like the new configuration window too. For macOS users, remember that "ctrl" means your command button (⌘), not control (⌃). If you want to use your mac's control button, refer to it as "meta". E.g., ["red", "meta+r"] translates to ⌃ + r on a mac.

Works great!!!

Works perfectly!
I had some keyboard hotkey conflicts with Alt, so I opted for Ctrl+Alt instead.
In case anyone has the same issue, here's what works for me:
For blue:
["blue","Ctrl+Alt+b"]
For red:
["red","Ctrl+Alt+r"]
For green:
["green","Ctrl+Alt+g"]
I had some keyboard hotkey conflicts with Alt, so I opted for Ctrl+Alt instead.
In case anyone has the same issue, here's what works for me:
For blue:
["blue","Ctrl+Alt+b"]
For red:
["red","Ctrl+Alt+r"]
For green:
["green","Ctrl+Alt+g"]

2491935955

For those who want info on adding buttons, scroll down to find the review from 9/6. That helped a lot.
Note: I was unable to add buttons to F7 but was able to add to F10. If you find yourself unable to add to one button, try again with another before proceeding to find another fix.
Note: I was unable to add buttons to F7 but was able to add to F10. If you find yourself unable to add to one button, try again with another before proceeding to find another fix.

At the moment this add-on caused a bug where I can't sync Anki. (I don't know if its the add-on itself or the combination between add ons)
Comment from author
Nothing this add-on changes should affect syncing.

Thanks! It's very convenient, but I cannot use F7 and F8.

!!!!!!!!!!!!!!!!

Why this service is not applicable not Anki mobile?😭

I downloaded python to open __init__.py and this is the code I see.
from aqt import mw
config = mw.addonManager.getConfig(__name__)
from anki.hooks import addHook
def updateColour(editor, colour):
editor.fcolour = colour
editor.onColourChanged()
editor._wrapWithColour(editor.fcolour)
def onSetupShortcuts(cuts, editor):
# add colours
for code, key in config['keys']:
cuts.append((key, lambda c=code: updateColour(editor, c)))
addHook("setupEditorShortcuts", onSetupShortcuts)
Where exactly am I supposed to paste the following ?
("red", "alt+r"),
("blue", "alt+b"),
("chocolate", "alt+c"),
("black", "alt+x"),
("white", "alt+w"),
Please, thank you
from aqt import mw
config = mw.addonManager.getConfig(__name__)
from anki.hooks import addHook
def updateColour(editor, colour):
editor.fcolour = colour
editor.onColourChanged()
editor._wrapWithColour(editor.fcolour)
def onSetupShortcuts(cuts, editor):
# add colours
for code, key in config['keys']:
cuts.append((key, lambda c=code: updateColour(editor, c)))
addHook("setupEditorShortcuts", onSetupShortcuts)
Where exactly am I supposed to paste the following ?
("red", "alt+r"),
("blue", "alt+b"),
("chocolate", "alt+c"),
("black", "alt+x"),
("white", "alt+w"),
Please, thank you

Nice!

easy to use and edit

Essential.

Extremely helpful!

Je n'arrive pas à changer les réglages, aucun ne fonctionne

Excellent!

red

Excelente !!! Acelerou bastante a criação de novos flashcards!! Adicionei os códigos com as outras cores que os colegas indicaram e ficou melhor ainda

Saves time making cards and allows entry of whatever HTML colour codes you want


Works well - tweaks for Macbook user learning Mandarin
This add on is just what I was looking for, and the comments left below were very helpful. To save someone spending the 40 minutes I did on exploring the shortcuts for a Macbook, some tips:
- The 'alt' shortcuts didn't seem to work for me because they interfered with other shortcuts already in the system
- For using the 'F' keys (i.e. fn + the relevant key) I had to disable some functionality associated with those keys before they would work changing colours (e.g. showing all windows at once). This can be done by going to System Preferences>Keyboard>Shortcuts and deselecting the options for F8 - F10 under 'Mission Control', 'Keyboard'. I never really used those F keys so it isn't a problem for me.
- I'm starting to learn Mandarin so I used a slightly different order for the colours which match the order of the tones and how I think of their sounds; and which might be helpful to others (relevant bid of code below).
Blue - F8/1st tone (high tone in sky)
Green - F9/2nd tone (rising from the trees)
Brown - F10/3rd tone (low in the ground/mud)
Red - F11/4th tone (slightly angry sound)
Black - F12
Code extract - put between the [ ]:
("red", "F11"),
("#00f", "F8"), ("#AA5603", "F10"), ("#000", "F12"), ("green", "F9")
Hope this is useful for others. Obviously you can swap around the colours etc.
This add on is just what I was looking for, and the comments left below were very helpful. To save someone spending the 40 minutes I did on exploring the shortcuts for a Macbook, some tips:
- The 'alt' shortcuts didn't seem to work for me because they interfered with other shortcuts already in the system
- For using the 'F' keys (i.e. fn + the relevant key) I had to disable some functionality associated with those keys before they would work changing colours (e.g. showing all windows at once). This can be done by going to System Preferences>Keyboard>Shortcuts and deselecting the options for F8 - F10 under 'Mission Control', 'Keyboard'. I never really used those F keys so it isn't a problem for me.
- I'm starting to learn Mandarin so I used a slightly different order for the colours which match the order of the tones and how I think of their sounds; and which might be helpful to others (relevant bid of code below).
Blue - F8/1st tone (high tone in sky)
Green - F9/2nd tone (rising from the trees)
Brown - F10/3rd tone (low in the ground/mud)
Red - F11/4th tone (slightly angry sound)
Black - F12
Code extract - put between the [ ]:
("red", "F11"),
("#00f", "F8"), ("#AA5603", "F10"), ("#000", "F12"), ("green", "F9")
Hope this is useful for others. Obviously you can swap around the colours etc.


works well, saves time!!
Use the belowing code to replace the former one( don't delete [] ). It works in the browser and the new card creating window.
("red", "alt+r"),
("blue", "alt+b"),
("chocolate", "alt+c"),
("black", "alt+x"),
("white", "alt+w"),
Use the belowing code to replace the former one( don't delete [] ). It works in the browser and the new card creating window.
("red", "alt+r"),
("blue", "alt+b"),
("chocolate", "alt+c"),
("black", "alt+x"),
("white", "alt+w"),




Works well, but 1 major complaint
This app is very useful, but the color changing shortcuts are not working in the quick-edit card section in the card browser. If this would work in that section, I would gladly rate it 5 stars.
Also, the code that the other reviewer posted is very helpful. Thank you for that.
This app is very useful, but the color changing shortcuts are not working in the quick-edit card section in the card browser. If this would work in that section, I would gladly rate it 5 stars.
Also, the code that the other reviewer posted is very helpful. Thank you for that.


Clue of add shortcuts
colours = [
("red", "F8"),
("#00f", "F9"), ("#AA5603", "F10"),("#000", "F11"), ("green", "F6")
]
colours = [
("red", "F8"),
("#00f", "F9"), ("#AA5603", "F10"),("#000", "F11"), ("green", "F6")
]

Great!
Works well. I could also create multikey shortcuts by moving the colours list below the import statements in the code. Below you can see that the yellow color can be applied by hitting Ctrl + P:
from aqt import mw
from aqt.qt import *
from anki.hooks import addHook
colours = [
("yellow", Qt.CTRL + Qt.Key_P),
]
Works well. I could also create multikey shortcuts by moving the colours list below the import statements in the code. Below you can see that the yellow color can be applied by hitting Ctrl + P:
from aqt import mw
from aqt.qt import *
from anki.hooks import addHook
colours = [
("yellow", Qt.CTRL + Qt.Key_P),
]

perhaps need updating
It works well on ver2.0.33, but failed on ver2.0.36
It works well on ver2.0.33, but failed on ver2.0.36


Old, but still gold!
Though this tool hasn't been updated for almost 4 years, it still works like a charm.
It works on Windows 10, Linux, Mac OS X. I use all these operating systems, and this adds-on works on all of them.
Someone posted 'not working' on mac, which is not true for my Mac OS X El Capitan. For those having trouble making it to work on Mac, please try to press 'fn' key at the same time when you press F8/F9/F10 key.
I also did a little modification to display 3 different colors - more than enough for my use.
Though this tool hasn't been updated for almost 4 years, it still works like a charm.
It works on Windows 10, Linux, Mac OS X. I use all these operating systems, and this adds-on works on all of them.
Someone posted 'not working' on mac, which is not true for my Mac OS X El Capitan. For those having trouble making it to work on Mac, please try to press 'fn' key at the same time when you press F8/F9/F10 key.
I also did a little modification to display 3 different colors - more than enough for my use.

not working
using it on mac.
it's not working.
not F8/F9 nor if i try to use own shortcuts...
i edit and restart but it's not working...
maybe there is need some proper manual? but i don't think i made something wrong
using it on mac.
it's not working.
not F8/F9 nor if i try to use own shortcuts...
i edit and restart but it's not working...
maybe there is need some proper manual? but i don't think i made something wrong

Yes, yes, yes!
Fantastic! This saves an immense amount of time for visually encoding gender (or really any other category...) into a deck for learners like me.
Fantastic! This saves an immense amount of time for visually encoding gender (or really any other category...) into a deck for learners like me.




Saves times!!


Thanks to the guy who posted the mod for combo keys!
This addon is not bad, but as it was, it was not very useful. Who posted that little hack, thank you very much, because now it makes sense using this addon.
This addon is not bad, but as it was, it was not very useful. Who posted that little hack, thank you very much, because now it makes sense using this addon.

Some issues
was hoping it could override the default hotkeys (like F3), but otherwise works great.
also wish Ctrl+R worked in the same way (subsequent text would be normal).
was hoping it could override the default hotkeys (like F3), but otherwise works great.
also wish Ctrl+R worked in the same way (subsequent text would be normal).

