---
title: Basic Theme Lexicon
description: Schema reference for the basic theme, provides a simplified theme definition for publications.
date: 2026-02-10
atUri: "at://did:plc:re3ebnp5v7ffagz6rb6xfei4/site.standard.document/3mek5jhsxa32c"
ogImage: opengraph-image-docs-basic-theme-lexicon-v2.png
---

import { Table, Updated } from '@/app/components/docs'

# Theme Lexicon

The `site.standard.theme.basic` lexicon provides a simplified theme definition for publications, enabling basic color customization for content display across different platforms and applications.

## Overview

This lexicon ensures publications maintain their visual identity across different reading applications and platforms by defining core colors for content display.

## Schema

### Required Properties

<Table
    headers={['Property', 'Type', 'Description']}
    rows={[
        ['background', 'ref', 'Color used for content background (ref → site.standard.theme.color#rgb)'],
        ['foreground', 'ref', 'Color used for content text (ref → site.standard.theme.color#rgb)'],
        ['accent', 'ref', 'Color used for links and button backgrounds (ref → site.standard.theme.color#rgb)'],
        ['accentForeground', 'ref', 'Color used for button text (ref → site.standard.theme.color#rgb)'],
    ]}
/>

## Color Format

Colors are defined using the `site.standard.theme.color#rgb` type from the `site.standard.theme.color` lexicon.

### RGB Color Type

Each color is an object with three required integer properties:

<Table
    headers={['Property', 'Type', 'Range', 'Description']}
    rows={[
        ['r', 'integer', '0-255', 'Red channel value'],
        ['g', 'integer', '0-255', 'Green channel value'],
        ['b', 'integer', '0-255', 'Blue channel value'],
    ]}
/>

### RGBA Color Type

The `site.standard.theme.color` lexicon also defines an `rgba` type for colors with transparency:

<Table
    headers={['Property', 'Type', 'Range', 'Description']}
    rows={[
        ['r', 'integer', '0-255', 'Red channel value'],
        ['g', 'integer', '0-255', 'Green channel value'],
        ['b', 'integer', '0-255', 'Blue channel value'],
        ['a', 'integer', '0-100', 'Alpha (opacity) value, where 0 is transparent and 100 is opaque'],
    ]}
/>

### Color Roles

- **background**: Main surface color for content areas
- **foreground**: Default color for body text and content
- **accent**: Color for interactive elements like links and button backgrounds
- **accentForeground**: Text color used on accent-colored backgrounds (ex: button text)

## Usage in Publications

Include the basic theme in your publication record:

```json
{
  "$type": "site.standard.publication",
  "url": "https://myblog.com",
  "name": "My Blog",
  "basicTheme": {
    "$type": "site.standard.theme.basic",
    "background": {
      "$type": "site.standard.theme.color#rgb",
      "r": 255,
      "g": 255,
      "b": 255
    },
    "foreground": {
      "$type": "site.standard.theme.color#rgb",
      "r": 31,
      "g": 41,
      "b": 55
    },
    "accent": {
      "$type": "site.standard.theme.color#rgb",
      "r": 59,
      "g": 130,
      "b": 246
    },
    "accentForeground": {
      "$type": "site.standard.theme.color#rgb",
      "r": 255,
      "g": 255,
      "b": 255
    }
  }
}
```

## Best Practices

2. **Consider readability**: Ensure foreground/background combinations are legible
3. **Test button colors**: Verify accent/accentForeground pairs have sufficient contrast
5. **Provide all required properties**: All four color properties are required for a valid theme

## Related

- [Publication lexicon](/docs/lexicons/publication) - Publications can include basicTheme
- [Quick Start](/docs/quick-start) - Implementation guide
- [Implementations](/docs/implementations) - See how platforms use theming
