Tint title page accent colors to poster's vibrant color

Override CSS custom properties (--primary, --ring, --primary-foreground,
--status-watching) on the title detail page wrapper using the vibrant
color from the poster's node-vibrant palette. All Tailwind classes
referencing these variables automatically pick up the new color.

Also await lazy color extraction in getTitleWithChildren() so palettes
are available on first visit to never-before-opened titles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 17:42:02 -05:00
co-authored by Claude Opus 4.6
parent 5f45214d07
commit 2ee20a6aff
3 changed files with 42 additions and 5 deletions
+4 -1
View File
@@ -10,6 +10,7 @@ import { titles } from "@/lib/db/schema";
import { getTitleWithChildren, importTitle } from "@/lib/services/metadata";
import { getUserTitleInfo } from "@/lib/services/tracking";
import { tmdbImageUrl } from "@/lib/tmdb/image";
import { getTitleThemeStyle } from "@/lib/utils/title-theme";
import { TitleActions } from "./_components/title-actions";
import { TitleAvailability } from "./_components/title-availability";
import { TitleHero } from "./_components/title-hero";
@@ -72,8 +73,10 @@ export default async function TitleDetailPage({
const { title, seasons, availability } = result;
const themeStyle = getTitleThemeStyle(title.colorPalette);
return (
<div className="relative space-y-10">
<div className="relative space-y-10" style={themeStyle}>
<TitleInteractionProvider
titleId={title.id}
titleType={title.type}