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: highContrastLightLightScheme), darkTheme: ThemeData(colorScheme: highContrastLightDarkScheme)). The raw values are on HighContrastLightDarkTokens and HighContrastLightLightTokens.

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

/// Bold yellow on black for maximum legibility.
class HighContrastDarkTokens {
  HighContrastDarkTokens._();
  static const colorBgBase = Color(0xFF000000);
  static const colorBgSurface = Color(0xFF0A0A0A);
  static const colorBgSubtle = Color(0xFF1A1A1A);
  static const colorBgRaised = Color(0xFF0F0F0F);
  static const colorBgHover = Color(0xFF222222);
  static const colorBgInput = Color(0xFF0A0A0A);
  static const colorTextPrimary = Color(0xFFFFFFFF);
  static const colorTextSecondary = Color(0xFFF0F0F0);
  static const colorTextMuted = Color(0xFFAAAAAA);
  static const colorAccentBase = Color(0xFFFFD700);
  static const colorAccentLight = Color(0xFFFFED4A);
  static const colorAccentDark = Color(0xFFCCAC00);
  static const colorAccentStrong = Color(0xFFFFD700);
  static const colorAccentOn = Color(0xFF0B0D10);
  static const colorAccentOnStrong = Color(0xFF0B0D10);
  static const colorAccentGlow = Color(0x59FFD700);
  static const colorLineBase = Color(0xFF444444);
  static const colorLineStrong = Color(0xFF666666);
  static const colorStatusOkBase = Color(0xFF00FF00);
  static const colorStatusOkText = Color(0xFF00FF00);
  static const colorStatusWarnBase = Color(0xFFFFFF00);
  static const colorStatusWarnText = Color(0xFFFFFF00);
  static const colorStatusBadBase = Color(0xFFFF0000);
  static const colorStatusBadText = Color(0xFFFF3D3D);
  static const colorStatusInfoBase = Color(0xFF00FFFF);
  static const colorStatusInfoText = Color(0xFF00FFFF);
  static const colorStatusLiveBase = Color(0xFFFF0000);
  static const colorStatusLiveText = Color(0xFFFF3D3D);
}

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

/// Black on white with strong edges and deep blue links.
class HighContrastLightTokens {
  HighContrastLightTokens._();
  static const colorBgBase = Color(0xFFFFFFFF);
  static const colorBgSurface = Color(0xFFFFFFFF);
  static const colorBgSubtle = Color(0xFFF2F2F2);
  static const colorBgRaised = Color(0xFFFFFFFF);
  static const colorBgHover = Color(0xFFE8E8E8);
  static const colorBgInput = Color(0xFFFFFFFF);
  static const colorTextPrimary = Color(0xFF000000);
  static const colorTextSecondary = Color(0xFF1A1A1A);
  static const colorTextMuted = Color(0xFF2B2B2B);
  static const colorAccentBase = Color(0xFF0000C8);
  static const colorAccentLight = Color(0xFF1A1AFF);
  static const colorAccentDark = Color(0xFF00008B);
  static const colorAccentStrong = Color(0xFF0000C8);
  static const colorAccentOn = Color(0xFFFFFFFF);
  static const colorAccentOnStrong = Color(0xFFFFFFFF);
  static const colorAccentGlow = Color(0x590000C8);
  static const colorLineBase = Color(0xFF000000);
  static const colorLineStrong = Color(0xFF333333);
  static const colorStatusOkBase = Color(0xFF22C55E);
  static const colorStatusOkText = Color(0xFF147638);
  static const colorStatusWarnBase = Color(0xFFF59E0B);
  static const colorStatusWarnText = Color(0xFF8E5C06);
  static const colorStatusBadBase = Color(0xFFEF4444);
  static const colorStatusBadText = Color(0xFFBF3636);
  static const colorStatusInfoBase = Color(0xFF38BDF8);
  static const colorStatusInfoText = Color(0xFF206E90);
  static const colorStatusLiveBase = Color(0xFFEF4444);
  static const colorStatusLiveText = Color(0xFFBF3636);
}

const highContrastLightScheme = ColorScheme(
  brightness: Brightness.light,
  primary: HighContrastLightTokens.colorAccentBase,
  onPrimary: HighContrastLightTokens.colorAccentOn,
  primaryContainer: HighContrastLightTokens.colorAccentStrong,
  onPrimaryContainer: HighContrastLightTokens.colorAccentOnStrong,
  secondary: HighContrastLightTokens.colorAccentLight,
  onSecondary: HighContrastLightTokens.colorAccentOn,
  tertiary: HighContrastLightTokens.colorStatusInfoBase,
  background: HighContrastLightTokens.colorBgBase,
  onBackground: HighContrastLightTokens.colorTextPrimary,
  surface: HighContrastLightTokens.colorBgRaised,
  onSurface: HighContrastLightTokens.colorTextPrimary,
  onSurfaceVariant: HighContrastLightTokens.colorTextSecondary,
  outline: HighContrastLightTokens.colorLineStrong,
  outlineVariant: HighContrastLightTokens.colorLineBase,
  error: HighContrastLightTokens.colorStatusBadBase,
  onError: HighContrastLightTokens.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#000000#ffffffThe page behind everything
  • color.bg.surface#0a0a0a#ffffffBands and side panels
  • color.bg.subtle#1a1a1a#f2f2f2Wells, tracks and quiet fills
  • color.bg.raised#0f0f0f#ffffffCards, rows and sheets
  • color.bg.hover#222222#e8e8e8A control under the pointer or finger
  • color.bg.input#0a0a0a#ffffffText fields
  • color.text.primary#ffffff#000000Body text and titles
  • color.text.secondary#f0f0f0#1a1a1aSupporting text
  • color.text.muted#aaaaaa#2b2b2bHints and meta lines
  • color.accent.base#ffd700#0000c8Links, icons, focus rings
  • color.accent.light#ffed4a#1a1affThe accent a step lighter
  • color.accent.dark#ccac00#00008bThe accent a step darker
  • color.accent.strong#ffd700#0000c8Filled buttons
  • color.accent.on#0b0d10#ffffffText on the accent
  • color.accent.onStrong#0b0d10#ffffffText on a filled button
  • color.accent.glowrgba(255,215,0,0.35)rgba(0,0,200,0.35)Glows and halos
  • color.line.base#444444#000000Dividers and outlines
  • color.line.strong#666666#333333Outlines that must show
  • color.status.ok.base#00ff00#22c55eSuccess fills
  • color.status.ok.text#00ff00#147638Success text on any surface
  • color.status.warn.base#ffff00#f59e0bWarning fills
  • color.status.warn.text#ffff00#8e5c06Warning text on any surface
  • color.status.bad.base#ff0000#ef4444Danger fills
  • color.status.bad.text#ff3d3d#bf3636Danger text on any surface
  • color.status.info.base#00ffff#38bdf8Information fills
  • color.status.info.text#00ffff#206e90Information text on any surface
  • color.status.live.base#ff0000#ef4444LIVE badges
  • color.status.live.text#ff3d3d#bf3636LIVE 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