mobile-music/lib/theme/tokens.dart
2026-07-29 14:14:18 -04:00

49 lines
1.8 KiB
Dart

import 'package:flutter/widgets.dart';
/// Design tokens mirroring Ratune's `dynamic`/`static` theme defaults
/// (see ratune `docs/sample-config.toml`, `theme.rs`, `color.rs`).
///
/// The palette is intentionally near-black and low-contrast; the *accent*
/// is the one lively color and, in the `dynamic` theme, is extracted live
/// from the current album art (Phase 2). Everything else stays fixed.
class RatuneColors {
const RatuneColors._();
/// App canvas — `background = #1a1a1a`.
static const Color background = Color(0xFF1A1A1A);
/// Panel/surface fill — `surface = #161616` (slightly darker than canvas).
static const Color surface = Color(0xFF161616);
/// Primary text — `foreground = #d4d0c8` (warm off-white, not pure white).
static const Color foreground = Color(0xFFD4D0C8);
/// Secondary/muted text — `dimmed = #5a5858`.
static const Color dimmed = Color(0xFF5A5858);
/// Hairline borders (inactive) — `border = #252525`.
static const Color border = Color(0xFF252525);
/// Hairline borders when a pane is focused — `border_active`.
/// Ratune tints this toward the accent; we start with a lighter grey and
/// swap in the accent at runtime once art extraction lands.
static const Color borderActive = Color(0xFF3A3A3A);
/// Default accent — `accent = #ff8c00`. Overridden per-track in `dynamic`.
static const Color accentDefault = Color(0xFFFF8C00);
}
/// Spacing scale — dense, "player as instrument" rather than airy mobile cards.
class RatuneSpacing {
const RatuneSpacing._();
static const double xs = 2;
static const double sm = 4;
static const double md = 8;
static const double lg = 12;
static const double xl = 16;
/// Minimum touch target per Apple/Material guidance — keep rows dense
/// visually but pad hit areas to at least this.
static const double minTouchTarget = 44;
}