Initial themes implementation, new default theme

This commit is contained in:
miruka
2019-07-24 02:14:34 -04:00
parent 345b17b21f
commit ec27ecf498
89 changed files with 956 additions and 165 deletions

View File

@@ -3,7 +3,9 @@
import asyncio
import random
from typing import Dict, Optional, Set, Tuple
from typing import Dict, List, Optional, Set, Tuple
import hsluv
from .app import App
from .events import users
@@ -127,3 +129,9 @@ class Backend:
@staticmethod
def inlinify(html: str) -> str:
return HTML_FILTER.filter_inline(html)
@staticmethod
def hsluv(hue: int, saturation: int, lightness: int) -> List[float]:
# (0-360, 0-100, 0-100) -> [0-1, 0-1, 0-1]
return hsluv.hsluv_to_rgb([hue, saturation, lightness])