Hi,
Is there a “correct way” to get the CSS for the Anki colors? Right now I am doing the following but it’s a bit hacky:
from aqt import colors
def get_colors(dark):
"""Get CSS string with Anki colors"""
css = ":root {\n"
for key, val in colors.__dict__.items():
if type(val) is dict and (val_ := val.get('dark') if dark else val.get('light')):
css += f''' --{key.lower().replace('_', '-')}: {val_};\n'''
css += '}'
return css
Cheers