Atmospheric Glass DESIGN.md Example

A glassmorphism weather UI that builds depth from translucent surfaces and blur over a vibrant gradient, with a full Material-style color set. Published verbatim in Google Labs' design.md repository. Related guide: Elevation & Depth.

Weather

Official Google Labs example, published under the Apache-2.0 license in google-labs-code/design.md. Mirrored here verbatim. md-design.io is an independent project, not affiliated with or endorsed by Google.

What this file renders to

Computed from the file below when this page is built. Open it in the viewer for the full guideline with navigation and diagnostics.

Colors

Aa
surface
18.50:1AAAwhite on fill
Aa
surface-dim
18.50:1AAAwhite on fill
Aa
surface-bright
11.52:1AAAwhite on fill
Aa
surface-container-lowest
19.24:1AAAwhite on fill
Aa
surface-container-low
17.16:1AAAwhite on fill
Aa
surface-container
16.40:1AAAwhite on fill
Aa
surface-container-high
14.32:1AAAwhite on fill
Aa
surface-container-highest
12.36:1AAAwhite on fill
Aa
on-surface
13.92:1AAAink on fill
Aa
on-surface-variant
10.56:1AAAink on fill
Aa
inverse-surface
13.92:1AAAink on fill
Aa
inverse-on-surface
13.15:1AAAwhite on fill
Aa
outline
5.66:1AAink on fill
Aa
outline-variant
9.37:1AAAwhite on fill
Aa
surface-tint
10.52:1AAAink on fill
Aa
primary
17.96:1AAAink on fill
Aa
on-primary
13.09:1AAAwhite on fill
Aa
primary-container
13.86:1AAAink on fill
Aa
on-primary-container
5.87:1AAwhite on fill
Aa
inverse-primary
6.43:1AAwhite on fill
Aa
secondary
10.55:1AAAink on fill
Aa
on-secondary
13.16:1AAAwhite on fill
Aa
secondary-container
9.01:1AAAwhite on fill
Aa
on-secondary-container
9.09:1AAAink on fill
Aa
tertiary
17.96:1AAAink on fill
Aa
on-tertiary
13.18:1AAAwhite on fill
Aa
tertiary-container
13.88:1AAAink on fill
Aa
on-tertiary-container
5.91:1AAwhite on fill
Aa
error
10.58:1AAAink on fill
Aa
on-error
13.10:1AAAwhite on fill
Aa
error-container
9.35:1AAAwhite on fill
Aa
on-error-container
13.90:1AAAink on fill
Aa
primary-fixed
13.86:1AAAink on fill
Aa
primary-fixed-dim
10.52:1AAAink on fill
Aa
on-primary-fixed
17.12:1AAAwhite on fill
Aa
on-primary-fixed-variant
9.35:1AAAwhite on fill
Aa
secondary-fixed
13.87:1AAAink on fill
Aa
secondary-fixed-dim
10.55:1AAAink on fill
Aa
on-secondary-fixed
17.11:1AAAwhite on fill
Aa
on-secondary-fixed-variant
9.32:1AAAwhite on fill
Aa
tertiary-fixed
13.88:1AAAink on fill
Aa
tertiary-fixed-dim
10.54:1AAAink on fill
Aa
on-tertiary-fixed
17.12:1AAAwhite on fill
Aa
on-tertiary-fixed-variant
9.35:1AAAwhite on fill
Aa
background
18.50:1AAAwhite on fill
Aa
on-background
13.92:1AAAink on fill
Aa
surface-variant
12.36:1AAAwhite on fill

Typography

display-lg
familyInter
size84px
weight700
leading90px
tracking-0.04em

Focus at altitude

headline-lg
familyInter
size32px
weight600
leading40px
tracking-0.02em

Focus at altitude

headline-md
familyInter
size24px
weight500
leading32px

The quick brown fox renders this specimen at its true size, weight and tracking.

body-lg
familyInter
size18px
weight400
leading28px

The quick brown fox renders this specimen at its true size, weight and tracking.

body-md
familyInter
size16px
weight400
leading24px

The quick brown fox renders this specimen at its true size, weight and tracking.

label-sm
familyInter
size12px
weight600
leading16px
tracking0.05em

RESERVED FOR THE ONE ACTION

Spacing

unit8px
container-padding24px
card-gap16px
section-margin40px
glass-padding20px

Radii

sm
0.25rem
DEFAULT
0.5rem
md
0.75rem
lg
1rem
xl
1.5rem
full
9999px

Components

preview1.00:1Failtext on fill

glass-card-standard · tokens

resolved
default
backgroundColor#ffffff1a
textColor#ffffff
rounded1rem
padding20px
preview1.00:1Failtext on fill

glass-card-elevated · tokens

resolved
default
backgroundColor#ffffff33
textColor#ffffff
rounded1.5rem
padding20px
preview13.09:1AAAtext on fill

button-primary · tokens

resolved
default
backgroundColor#ffffff
textColor#2f3131
typographytypography
rounded1.5rem
height48px
padding0 24px
hover
backgroundColor#c6c6c7
preview1.00:1Failtext on fill

button-ghost · tokens

resolved
default
backgroundColor#ffffff0d
textColor#ffffff
typographytypography
rounded1.5rem
preview1.00:1Failtext on fill

input-field · tokens

resolved
default
backgroundColor#ffffff1a
textColor#ffffff
typographytypography
rounded1.5rem
padding20px
height48px
previewNo resolvable background / text color pair.

weather-display-large · tokens

resolved
default
textColor#ffffff
typographytypography
previewNo resolvable background / text color pair.

metric-label · tokens

resolved
default
textColor#c4c7c8
typographytypography
previewNo resolvable background / text color pair.

list-item-interactive · tokens

resolved
default
backgroundColor#00000000
rounded0.75rem
padding12px
hover
backgroundColor#ffffff1a

Lint summary

The same checks as the DESIGN.md linter, run on this file at build time. Design system defines 47 colors, 6 typography scales, 6 rounding levels, 5 spacing tokens, 10 components.

Full DESIGN.md source

Copy it, edit it, and use it as a starting point for your own file. Nothing is uploaded.

---
name: Atmospheric Glass
colors:
  surface: "#0b1326"
  surface-dim: "#0b1326"
  surface-bright: "#31394d"
  surface-container-lowest: "#060e20"
  surface-container-low: "#131b2e"
  surface-container: "#171f33"
  surface-container-high: "#222a3d"
  surface-container-highest: "#2d3449"
  on-surface: "#dae2fd"
  on-surface-variant: "#c4c7c8"
  inverse-surface: "#dae2fd"
  inverse-on-surface: "#283044"
  outline: "#8e9192"
  outline-variant: "#444748"
  surface-tint: "#c6c6c7"
  primary: "#ffffff"
  on-primary: "#2f3131"
  primary-container: "#e2e2e2"
  on-primary-container: "#636565"
  inverse-primary: "#5d5f5f"
  secondary: "#adc9eb"
  on-secondary: "#14324e"
  secondary-container: "#304b68"
  on-secondary-container: "#9fbbdd"
  tertiary: "#ffffff"
  on-tertiary: "#620040"
  tertiary-container: "#ffd8e7"
  on-tertiary-container: "#ab3779"
  error: "#ffb4ab"
  on-error: "#690005"
  error-container: "#93000a"
  on-error-container: "#ffdad6"
  primary-fixed: "#e2e2e2"
  primary-fixed-dim: "#c6c6c7"
  on-primary-fixed: "#1a1c1c"
  on-primary-fixed-variant: "#454747"
  secondary-fixed: "#d0e4ff"
  secondary-fixed-dim: "#adc9eb"
  on-secondary-fixed: "#001d35"
  on-secondary-fixed-variant: "#2d4965"
  tertiary-fixed: "#ffd8e7"
  tertiary-fixed-dim: "#ffafd3"
  on-tertiary-fixed: "#3d0026"
  on-tertiary-fixed-variant: "#85145a"
  background: "#0b1326"
  on-background: "#dae2fd"
  surface-variant: "#2d3449"
typography:
  display-lg:
    fontFamily: Inter
    fontSize: 84px
    fontWeight: "700"
    lineHeight: 90px
    letterSpacing: -0.04em
  headline-lg:
    fontFamily: Inter
    fontSize: 32px
    fontWeight: "600"
    lineHeight: 40px
    letterSpacing: -0.02em
  headline-md:
    fontFamily: Inter
    fontSize: 24px
    fontWeight: "500"
    lineHeight: 32px
  body-lg:
    fontFamily: Inter
    fontSize: 18px
    fontWeight: "400"
    lineHeight: 28px
  body-md:
    fontFamily: Inter
    fontSize: 16px
    fontWeight: "400"
    lineHeight: 24px
  label-sm:
    fontFamily: Inter
    fontSize: 12px
    fontWeight: "600"
    lineHeight: 16px
    letterSpacing: 0.05em
rounded:
  sm: 0.25rem
  DEFAULT: 0.5rem
  md: 0.75rem
  lg: 1rem
  xl: 1.5rem
  full: 9999px
spacing:
  unit: 8px
  container-padding: 24px
  card-gap: 16px
  section-margin: 40px
  glass-padding: 20px
components:
  glass-card-standard:
    backgroundColor: rgba(255, 255, 255, 0.1)
    textColor: "{colors.primary}"
    rounded: "{rounded.lg}"
    padding: "{spacing.glass-padding}"
  glass-card-elevated:
    backgroundColor: rgba(255, 255, 255, 0.2)
    textColor: "{colors.primary}"
    rounded: "{rounded.xl}"
    padding: "{spacing.glass-padding}"
  button-primary:
    backgroundColor: "{colors.primary}"
    textColor: "{colors.on-primary}"
    typography: "{typography.label-sm}"
    rounded: "{rounded.xl}"
    height: 48px
    padding: 0 24px
  button-primary-hover:
    backgroundColor: "{colors.primary-fixed-dim}"
  button-ghost:
    backgroundColor: rgba(255, 255, 255, 0.05)
    textColor: "{colors.primary}"
    typography: "{typography.label-sm}"
    rounded: "{rounded.xl}"
  input-field:
    backgroundColor: rgba(255, 255, 255, 0.1)
    textColor: "{colors.primary}"
    typography: "{typography.body-md}"
    rounded: "{rounded.xl}"
    padding: 20px
    height: 48px
  weather-display-large:
    textColor: "{colors.primary}"
    typography: "{typography.display-lg}"
  metric-label:
    textColor: "{colors.on-surface-variant}"
    typography: "{typography.label-sm}"
  list-item-interactive:
    backgroundColor: transparent
    rounded: "{rounded.md}"
    padding: 12px
  list-item-interactive-hover:
    backgroundColor: rgba(255, 255, 255, 0.1)
---

## Brand & Style

This design system centers on a high-fidelity Glassmorphism aesthetic designed to evoke a sense of clarity, depth, and modern sophistication. The brand personality is ethereal yet functional, transforming complex meteorological data into a serene visual experience.

The UI relies on a "vibrant-minimalist" approach: the background provides the energy through multi-colored abstract gradients (pinks, purples, and blues), while the interface elements act as frosted crystalline lenses that focus the user's attention. The emotional response is intended to be calm and premium, utilizing transparency and blur to simulate physical layers of glass floating in a fluid, digital space.

## Colors

The color strategy prioritizes luminosity and contrast. Because the background is a vibrant, multi-colored abstract composition, the UI components utilize a monochromatic white palette with varying alpha channels to maintain legibility.

- **Primary Canvas:** A multi-stop linear or radial gradient background featuring Deep Blue (#1E3A8A), Vivid Purple (#7E22CE), and Soft Pink (#DB2777).
- **Surface Alpha:** Component backgrounds are never solid. They range from `rgba(255, 255, 255, 0.1)` for secondary depth to `0.2` for primary interaction areas.
- **Accents:** Semantic colors for weather conditions (e.g., Warning Yellow, Rain Blue) should be applied with high saturation but low opacity fills to maintain the glass effect.
- **Text:** Strictly white (#FFFFFF) or high-tint silver (#E2E8F0) to ensure WCAG compliance against the vibrant background.

## Typography

The design system utilizes **Inter** for its neutral, geometric clarity which balances the organic nature of the blurred backgrounds.

- **Hierarchy:** Large display sizes are used for temperature readings to create a clear focal point.
- **Legibility:** On frosted glass, font weight is increased by one tier (e.g., using Medium instead of Regular) to counteract the visual noise of the background blur.
- **Treatment:** Subtle text-shadows (`0px 2px 4px rgba(0,0,0,0.15)`) may be applied to small labels to ensure they "pop" against lighter areas of the background gradient.

## Layout & Spacing

The layout follows a fluid, contextual model. Elements are grouped into "Glass Containers" that float within the safe areas of the viewport.

- **Rhythm:** An 8px base grid governs all dimensions.
- **Grouping:** Related weather metrics (humidity, wind, UV index) are housed in a CSS grid or flex layout with 16px gaps.
- **Negative Space:** Generous outer margins (24px+) are maintained to ensure the vibrant background is visible, reinforcing the "floating" nature of the interface.

## Elevation & Depth

Depth in this design system is not achieved through darkness, but through the physics of light and refraction.

- **The Glass Stack:**
  - **Level 1 (Base):** Dynamic background gradient with a slight grain texture.
  - **Level 2 (Standard Card):** `backdrop-filter: blur(20px)`, `background: rgba(255, 255, 255, 0.1)`.
  - **Level 3 (Elevated/Modals):** `backdrop-filter: blur(40px)`, `background: rgba(255, 255, 255, 0.2)`.
- **Edge Definition:** Every glass surface must have a 1px solid border at `rgba(255, 255, 255, 0.2)`. A secondary inner "shine" border (top and left only) can be used to simulate a light source.
- **Shadows:** Use extremely soft, spread-out shadows (`box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1)`) to separate the glass layers from the background without making the UI feel "heavy."

## Shapes

The shape language is organic and approachable. This design system uses "Rounded" (Level 2) settings to complement the fluid nature of the background.

- **Cards:** Use `1rem` (16px) for standard weather cards.
- **Action Elements:** Buttons and search bars use `rounded-xl` (1.5rem / 24px) to create a soft, tactile feel.
- **Icons:** Weather iconography should be line-based with rounded caps (2px stroke width) to match the border weights of the containers.

## Components

### Glass Containers

Standard cards use a 20px blur for general metrics, while elevated cards (modals or focal points) use 40px blur and higher opacity to sit physically higher in the stack. All glass elements must feature a 1px white border to simulate light refraction on the edges.

### Action Elements

Buttons use the `rounded-xl` setting to maintain a soft, organic feel. Primary buttons are solid white for maximum contrast, while ghost buttons utilize backdrop filters to remain integrated with the atmospheric background.

### Inputs & Interaction

Interactive list items and text inputs use subtle hover states and light blurs rather than solid color changes, preserving the "crystalline" transparency of the UI.

### Typography Application

Large weather displays utilize subtle text shadows to maintain legibility against the unpredictable colors of the background gradient. Metric labels should remain secondary in hierarchy using the silver-tinted `on-surface-variant` color.

More files: all DESIGN.md examples and templates.