OpenVibe Tokens

Your theme, as code

Take any OpenVibe theme into your own app, its light and dark halves together: the web, Android, iOS, Flutter or Figma. The colours are the ones the network paints.

MaterialApp(theme: ThemeData(colorScheme: roseLightScheme), darkTheme: ThemeData(colorScheme: roseDarkScheme)). The raw values are on RoseDarkTokens and RoseLightTokens.

// Sakura (dark) — generated by openvibe-shared/tokens v1 from the OpenVibe theme "sakura-night". Regenerate instead of editing.
import 'package:flutter/material.dart';

/// Cherry blossom on indigo.
class SakuraDarkTokens {
  SakuraDarkTokens._();
  static const colorBgBase = Color(0xFF0E0A14);
  static const colorBgSurface = Color(0xFF150F1C);
  static const colorBgSubtle = Color(0xFF1C1526);
  static const colorBgRaised = Color(0xFF181020);
  static const colorBgHover = Color(0xFF221830);
  static const colorBgInput = Color(0xFF100C16);
  static const colorTextPrimary = Color(0xFFF0E0F0);
  static const colorTextSecondary = Color(0xFFC0A0C0);
  static const colorTextMuted = Color(0xFF997D99);
  static const colorAccentBase = Color(0xFFF472B6);
  static const colorAccentLight = Color(0xFFF9A8D4);
  static const colorAccentDark = Color(0xFFDB2777);
  static const colorAccentStrong = Color(0xFFF472B6);
  static const colorAccentOn = Color(0xFF0B0D10);
  static const colorAccentOnStrong = Color(0xFF0B0D10);
  static const colorAccentGlow = Color(0x59F472B6);
  static const colorLineBase = Color(0xFF2A1A30);
  static const colorLineStrong = Color(0xFF3A2A40);
  static const colorStatusOkBase = Color(0xFF22C55E);
  static const colorStatusOkText = Color(0xFF22C55E);
  static const colorStatusWarnBase = Color(0xFFF59E0B);
  static const colorStatusWarnText = Color(0xFFF59E0B);
  static const colorStatusBadBase = Color(0xFFEF4444);
  static const colorStatusBadText = Color(0xFFEF4848);
  static const colorStatusInfoBase = Color(0xFF38BDF8);
  static const colorStatusInfoText = Color(0xFF38BDF8);
  static const colorStatusLiveBase = Color(0xFFEF4444);
  static const colorStatusLiveText = Color(0xFFEF4848);
}

const sakuraDarkScheme = ColorScheme(
  brightness: Brightness.dark,
  primary: SakuraDarkTokens.colorAccentBase,
  onPrimary: SakuraDarkTokens.colorAccentOn,
  primaryContainer: SakuraDarkTokens.colorAccentStrong,
  onPrimaryContainer: SakuraDarkTokens.colorAccentOnStrong,
  secondary: SakuraDarkTokens.colorAccentLight,
  onSecondary: SakuraDarkTokens.colorAccentOn,
  tertiary: SakuraDarkTokens.colorStatusInfoBase,
  background: SakuraDarkTokens.colorBgBase,
  onBackground: SakuraDarkTokens.colorTextPrimary,
  surface: SakuraDarkTokens.colorBgRaised,
  onSurface: SakuraDarkTokens.colorTextPrimary,
  onSurfaceVariant: SakuraDarkTokens.colorTextSecondary,
  outline: SakuraDarkTokens.colorLineStrong,
  outlineVariant: SakuraDarkTokens.colorLineBase,
  error: SakuraDarkTokens.colorStatusBadBase,
  onError: SakuraDarkTokens.colorAccentOnStrong,
);

/// Blush pink, light and delicate.
class SakuraLightTokens {
  SakuraLightTokens._();
  static const colorBgBase = Color(0xFFFFF5F7);
  static const colorBgSurface = Color(0xFFFCE7EC);
  static const colorBgSubtle = Color(0xFFF5D5DE);
  static const colorBgRaised = Color(0xFFFFF7F9);
  static const colorBgHover = Color(0xFFFCE0E8);
  static const colorBgInput = Color(0xFFFDEEF2);
  static const colorTextPrimary = Color(0xFF2E1420);
  static const colorTextSecondary = Color(0xFF6A3850);
  static const colorTextMuted = Color(0xFF81536C);
  static const colorAccentBase = Color(0xFFBF183D);
  static const colorAccentLight = Color(0xFFB02D44);
  static const colorAccentDark = Color(0xFFBE123C);
  static const colorAccentStrong = Color(0xFFBF183D);
  static const colorAccentOn = Color(0xFFFFFFFF);
  static const colorAccentOnStrong = Color(0xFFFFFFFF);
  static const colorAccentGlow = Color(0x59BF183D);
  static const colorLineBase = Color(0xFFF0C8D4);
  static const colorLineStrong = Color(0xFFE4B0C0);
  static const colorStatusOkBase = Color(0xFF22C55E);
  static const colorStatusOkText = Color(0xFF136E35);
  static const colorStatusWarnBase = Color(0xFFF59E0B);
  static const colorStatusWarnText = Color(0xFF845506);
  static const colorStatusBadBase = Color(0xFFEF4444);
  static const colorStatusBadText = Color(0xFFB13232);
  static const colorStatusInfoBase = Color(0xFF38BDF8);
  static const colorStatusInfoText = Color(0xFF1E6686);
  static const colorStatusLiveBase = Color(0xFFEF4444);
  static const colorStatusLiveText = Color(0xFFB13232);
}

const sakuraLightScheme = ColorScheme(
  brightness: Brightness.light,
  primary: SakuraLightTokens.colorAccentBase,
  onPrimary: SakuraLightTokens.colorAccentOn,
  primaryContainer: SakuraLightTokens.colorAccentStrong,
  onPrimaryContainer: SakuraLightTokens.colorAccentOnStrong,
  secondary: SakuraLightTokens.colorAccentLight,
  onSecondary: SakuraLightTokens.colorAccentOn,
  tertiary: SakuraLightTokens.colorStatusInfoBase,
  background: SakuraLightTokens.colorBgBase,
  onBackground: SakuraLightTokens.colorTextPrimary,
  surface: SakuraLightTokens.colorBgRaised,
  onSurface: SakuraLightTokens.colorTextPrimary,
  onSurfaceVariant: SakuraLightTokens.colorTextSecondary,
  outline: SakuraLightTokens.colorLineStrong,
  outlineVariant: SakuraLightTokens.colorLineBase,
  error: SakuraLightTokens.colorStatusBadBase,
  onError: SakuraLightTokens.colorAccentOnStrong,
);

/// The OpenVibe kit's radius, space, size and type scales: the same in every theme.
class OvScale {
  OvScale._();
  static const double radiusSm = 10;
  static const double radiusMd = 14;
  static const double radiusLg = 20;
  static const double radiusPill = 999;
  static const double spaceXs = 4;
  static const double spaceSm = 8;
  static const double spaceMd = 12;
  static const double spaceLg = 16;
  static const double spaceXl = 24;
  static const double spaceXxl = 32;
  static const double sizeTap = 44;
  static const double sizeIcon = 20;
  static const double sizeAvatar = 34;
  static const double typeSizeCaption = 12;
  static const double typeSizeMeta = 13;
  static const double typeSizeBody = 15;
  static const double typeSizeLead = 17;
  static const double typeSizeTitle = 20;
  static const double typeSizeHeadline = 24;
  static const double typeSizeDisplay = 34;
}

Files your tools can fetch

This theme on its own, with the motion every OpenVibe page shares and the mark’s colours. Each one has a lasting address a build or a design tool can read straight from here.

Every colour token · 28 of them
  • color.bg.base#0e0a14#fff5f7The page behind everything
  • color.bg.surface#150f1c#fce7ecBands and side panels
  • color.bg.subtle#1c1526#f5d5deWells, tracks and quiet fills
  • color.bg.raised#181020#fff7f9Cards, rows and sheets
  • color.bg.hover#221830#fce0e8A control under the pointer or finger
  • color.bg.input#100c16#fdeef2Text fields
  • color.text.primary#f0e0f0#2e1420Body text and titles
  • color.text.secondary#c0a0c0#6a3850Supporting text
  • color.text.muted#997d99#81536cHints and meta lines
  • color.accent.base#f472b6#bf183dLinks, icons, focus rings
  • color.accent.light#f9a8d4#b02d44The accent a step lighter
  • color.accent.dark#db2777#be123cThe accent a step darker
  • color.accent.strong#f472b6#bf183dFilled buttons
  • color.accent.on#0b0d10#ffffffText on the accent
  • color.accent.onStrong#0b0d10#ffffffText on a filled button
  • color.accent.glowrgba(244,114,182,0.35)rgba(191,24,61,0.35)Glows and halos
  • color.line.base#2a1a30#f0c8d4Dividers and outlines
  • color.line.strong#3a2a40#e4b0c0Outlines that must show
  • color.status.ok.base#22c55e#22c55eSuccess fills
  • color.status.ok.text#22c55e#136e35Success text on any surface
  • color.status.warn.base#f59e0b#f59e0bWarning fills
  • color.status.warn.text#f59e0b#845506Warning text on any surface
  • color.status.bad.base#ef4444#ef4444Danger fills
  • color.status.bad.text#ef4848#b13232Danger text on any surface
  • color.status.info.base#38bdf8#38bdf8Information fills
  • color.status.info.text#38bdf8#1e6686Information text on any surface
  • color.status.live.base#ef4444#ef4444LIVE badges
  • color.status.live.text#ef4848#b13232LIVE text on any surface

Every theme also carries the kit's scales: radius.*, space.* (4 to 32), size.tap (44), type.size.*, type.weight.* and motion.*.

Why tokens, and what is next

A theme on OpenVibe is one set of design tokens: semantic names such as color.accent.strong and space.lg, kept apart from any one platform. The web reads them as CSS variables today. An Android or iOS app reads the same values in Compose or SwiftUI, so a native app wears your theme without being a web page in a frame.

The format is the W3C Design Tokens one, so the same file works in Style Dictionary, Tokens Studio and Figma. Next: the kit's components described the same way (anatomy, states, roles), so a page made on OpenVibe.Design can be drawn natively too.

Change this theme in the studio The tokens API