lemoncurry/lemoncurry/theme.py

18 lines
337 B
Python
Raw Permalink Normal View History

from django.conf import settings
from os.path import join
from yaml import safe_load
path = join(
settings.BASE_DIR,
2023-08-10 02:52:37 -04:00
"lemoncurry",
"static",
"base16-materialtheme-scheme",
"material-darker.yaml",
)
2023-08-10 02:52:37 -04:00
with open(path, "r") as f:
theme = safe_load(f)
def color(i):
2023-08-10 02:52:37 -04:00
return "#" + theme["base0" + format(i, "1X")]