Miami Cruise

Miami Cruise / Apps / Design tokens

Design tokens

The palette as JSON, for any app that isn't listed yet.

Install

  1. Download

    Download tokens.json and contrast.json.

    curl -fsSLO https://lanjelin.github.io/miami-cruise/downloads/tokens/tokens.json
    curl -fsSLO https://lanjelin.github.io/miami-cruise/downloads/tokens/contrast.json
  2. Read the tokens

    The file has a dark and a light object, each mapping a token name to a hex colour. contrast.json lists the contrast ratios if you want to check your own pairings.

    import json
    
    tokens = json.load(open("tokens.json"))
    print(tokens["dark"]["accent"])  # the hero colour
  3. Map them to your app

    accent is the single highlight colour: primary action, selection, focus, links. success, warning, danger and info are green, yellow, red and cyan. text, muted and disabled are the text ramp. bg, panel, border, hover and row are surfaces. on-accent is the text colour to use on an accent fill. The full role table is in the porting guide.

    Every text and accent colour is at least 4.5:1 against bg, so you can use them for text without checking.