add theme 1

This commit is contained in:
David Rodenkirchen 2024-05-24 17:44:35 +02:00
parent 1831149e4c
commit 5dd65c82ed

View File

@ -7,11 +7,24 @@ import rio
from . import pages
from . import components as comps
theme = rio.Theme.from_colors(
primary_color=rio.Color.from_hex("01dffdff"),
secondary_color=rio.Color.from_hex("0083ffff"),
themes = [
rio.Theme.from_colors(
primary_color=rio.Color.from_hex("ff800d"),
secondary_color=rio.Color.from_hex("ae5714"),
background_color=rio.Color.from_hex("090021"),
hud_color=rio.Color.from_hex("2c2340"),
text_color=rio.Color.from_hex("fefefe"),
light=False,
),
rio.Theme.from_colors(
primary_color=rio.Color.from_hex("ff800d"),
secondary_color=rio.Color.from_hex("ae5714"),
background_color=rio.Color.from_hex("090021"),
hud_color=rio.Color.from_hex("2c2340"),
text_color=rio.Color.from_hex("fefefe"),
light=False,
)
]
async def on_session_start(s: rio.Session) -> None:
@ -27,7 +40,7 @@ app = rio.App(
build=pages.Home,
),
],
theme=theme,
theme=themes[0],
assets_dir=Path(__file__).parent / "assets",
on_session_start=on_session_start
)