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: brightLightScheme), darkTheme: ThemeData(colorScheme: brightDarkScheme)). The raw values are on BrightDarkTokens and BrightLightTokens.

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

/// Nearly black; the interface is the light.
class AbyssDarkTokens {
  AbyssDarkTokens._();
  static const colorBgBase = Color(0xFF000000);
  static const colorBgSurface = Color(0xFF080808);
  static const colorBgSubtle = Color(0xFF111111);
  static const colorBgRaised = Color(0xFF0A0A0A);
  static const colorBgHover = Color(0xFF181818);
  static const colorBgInput = Color(0xFF050505);
  static const colorTextPrimary = Color(0xFFCCCCCC);
  static const colorTextSecondary = Color(0xFF888888);
  static const colorTextMuted = Color(0xFF828282);
  static const colorAccentBase = Color(0xFFFFFFFF);
  static const colorAccentLight = Color(0xFFFFFFFF);
  static const colorAccentDark = Color(0xFFAAAAAA);
  static const colorAccentStrong = Color(0xFFFFFFFF);
  static const colorAccentOn = Color(0xFF0B0D10);
  static const colorAccentOnStrong = Color(0xFF0B0D10);
  static const colorAccentGlow = Color(0x59FFFFFF);
  static const colorLineBase = Color(0xFF1A1A1A);
  static const colorLineStrong = Color(0xFF252525);
  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(0xFFEF4444);
  static const colorStatusInfoBase = Color(0xFF38BDF8);
  static const colorStatusInfoText = Color(0xFF38BDF8);
  static const colorStatusLiveBase = Color(0xFFEF4444);
  static const colorStatusLiveText = Color(0xFFEF4444);
}

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

/// Abyss turned inside out: pure white, ink black, nothing else.
class AbyssLightTokens {
  AbyssLightTokens._();
  static const colorBgBase = Color(0xFFFFFFFF);
  static const colorBgSurface = Color(0xFFF6F6F6);
  static const colorBgSubtle = Color(0xFFECECEC);
  static const colorBgRaised = Color(0xFFFFFFFF);
  static const colorBgHover = Color(0xFFF0F0F0);
  static const colorBgInput = Color(0xFFFAFAFA);
  static const colorTextPrimary = Color(0xFF0A0A0A);
  static const colorTextSecondary = Color(0xFF3D3D3D);
  static const colorTextMuted = Color(0xFF5C5C5C);
  static const colorAccentBase = Color(0xFF111111);
  static const colorAccentLight = Color(0xFF333333);
  static const colorAccentDark = Color(0xFF000000);
  static const colorAccentStrong = Color(0xFF111111);
  static const colorAccentOn = Color(0xFFFFFFFF);
  static const colorAccentOnStrong = Color(0xFFFFFFFF);
  static const colorAccentGlow = Color(0x59111111);
  static const colorLineBase = Color(0xFFE2E2E2);
  static const colorLineStrong = Color(0xFFD0D0D0);
  static const colorStatusOkBase = Color(0xFF22C55E);
  static const colorStatusOkText = Color(0xFF157A3A);
  static const colorStatusWarnBase = Color(0xFFF59E0B);
  static const colorStatusWarnText = Color(0xFF935F07);
  static const colorStatusBadBase = Color(0xFFEF4444);
  static const colorStatusBadText = Color(0xFFBF3636);
  static const colorStatusInfoBase = Color(0xFF38BDF8);
  static const colorStatusInfoText = Color(0xFF227195);
  static const colorStatusLiveBase = Color(0xFFEF4444);
  static const colorStatusLiveText = Color(0xFFBF3636);
}

const abyssLightScheme = ColorScheme(
  brightness: Brightness.light,
  primary: AbyssLightTokens.colorAccentBase,
  onPrimary: AbyssLightTokens.colorAccentOn,
  primaryContainer: AbyssLightTokens.colorAccentStrong,
  onPrimaryContainer: AbyssLightTokens.colorAccentOnStrong,
  secondary: AbyssLightTokens.colorAccentLight,
  onSecondary: AbyssLightTokens.colorAccentOn,
  tertiary: AbyssLightTokens.colorStatusInfoBase,
  background: AbyssLightTokens.colorBgBase,
  onBackground: AbyssLightTokens.colorTextPrimary,
  surface: AbyssLightTokens.colorBgRaised,
  onSurface: AbyssLightTokens.colorTextPrimary,
  onSurfaceVariant: AbyssLightTokens.colorTextSecondary,
  outline: AbyssLightTokens.colorLineStrong,
  outlineVariant: AbyssLightTokens.colorLineBase,
  error: AbyssLightTokens.colorStatusBadBase,
  onError: AbyssLightTokens.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#080808#f6f6f6Bands and side panels
  • color.bg.subtle#111111#ecececWells, tracks and quiet fills
  • color.bg.raised#0a0a0a#ffffffCards, rows and sheets
  • color.bg.hover#181818#f0f0f0A control under the pointer or finger
  • color.bg.input#050505#fafafaText fields
  • color.text.primary#cccccc#0a0a0aBody text and titles
  • color.text.secondary#888888#3d3d3dSupporting text
  • color.text.muted#828282#5c5c5cHints and meta lines
  • color.accent.base#ffffff#111111Links, icons, focus rings
  • color.accent.light#ffffff#333333The accent a step lighter
  • color.accent.dark#aaaaaa#000000The accent a step darker
  • color.accent.strong#ffffff#111111Filled buttons
  • color.accent.on#0b0d10#ffffffText on the accent
  • color.accent.onStrong#0b0d10#ffffffText on a filled button
  • color.accent.glowrgba(255,255,255,0.35)rgba(17,17,17,0.35)Glows and halos
  • color.line.base#1a1a1a#e2e2e2Dividers and outlines
  • color.line.strong#252525#d0d0d0Outlines that must show
  • color.status.ok.base#22c55e#22c55eSuccess fills
  • color.status.ok.text#22c55e#157a3aSuccess text on any surface
  • color.status.warn.base#f59e0b#f59e0bWarning fills
  • color.status.warn.text#f59e0b#935f07Warning text on any surface
  • color.status.bad.base#ef4444#ef4444Danger fills
  • color.status.bad.text#ef4444#bf3636Danger text on any surface
  • color.status.info.base#38bdf8#38bdf8Information fills
  • color.status.info.text#38bdf8#227195Information text on any surface
  • color.status.live.base#ef4444#ef4444LIVE badges
  • color.status.live.text#ef4444#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