# family.pardy.design.theme

> Published by [pardy.at](https://lexicon.garden/identity/did:plc:dp7v5b5kejmmzzpwmqyf5wj6)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:dp7v5b5kejmmzzpwmqyf5wj6/family.pardy.design.theme)
- [Documentation](https://lexicon.garden/lexicon/did:plc:dp7v5b5kejmmzzpwmqyf5wj6/family.pardy.design.theme/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:dp7v5b5kejmmzzpwmqyf5wj6/family.pardy.design.theme/examples)

## Definitions

### `family.pardy.design.theme#color`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `role` | `string` | Yes | A semantic role name (camelCase). Open set: readers use the roles they know and ignore the rest. |
| `value` | `string` | Yes | Hex color: #rgb, #rgba, #rrggbb or #rrggbbaa. |

### `family.pardy.design.theme#conditions`

**Type**: `object`

Every listed dimension must match. Open sets: readers ignore values they don't know.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `season` | `array` | No |  |
| `timeOfDay` | `array` | No |  |
| `weather` | `array` | No |  |

### `family.pardy.design.theme#font`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `family` | `string` | Yes | A font family name (letters, digits, spaces, hyphens). Apps fall back to their own fonts if they don't have it. |
| `role` | `string` | Yes | A semantic role name (camelCase). Open set: readers use the roles they know and ignore the rest. |

### `family.pardy.design.theme`

**Type**: `record`

A general-purpose visual theme: colors, fonts and corner radii by semantic role. Public, so any app can publish and use it. Apps map roles to their own styling, ignore roles they don't know, and must validate values before using them.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `colorScheme` | `string` | Yes |  |
| `colors` | `array` | Yes |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `description` | `string` | No |  |
| `emoji` | `string` | No | A small picture for theme pickers. |
| `fonts` | `array` | No |  |
| `name` | `string` | Yes |  |
| `radii` | `array` | No |  |
| `scenes` | `array` | No | Variants for the conditions outside. The most specific matching scene wins; earlier scenes win ties. |

### `family.pardy.design.theme#radius`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `role` | `string` | Yes | A semantic role name (camelCase). Open set: readers use the roles they know and ignore the rest. |
| `value` | `integer` | Yes | Pixels. |

### `family.pardy.design.theme#scene`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `background` | `blob` | No | Artwork shown behind everything. |
| `colorScheme` | `string` | No |  |
| `colors` | `array` | No | Overrides the theme's colors, role by role. |
| `name` | `string` | Yes |  |
| `when` | `ref` → `#conditions` | No |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "color": {
      "properties": {
        "role": {
          "description": "A semantic role name (camelCase). Open set: readers use the roles they know and ignore the rest.",
          "knownValues": [
            "background",
            "onBackground",
            "surface",
            "onSurface",
            "surfaceVariant",
            "card",
            "onCard",
            "onCardMuted",
            "accent",
            "onAccent",
            "neutral",
            "border",
            "success",
            "warning",
            "danger",
            "info"
          ],
          "maxLength": 32,
          "type": "string"
        },
        "value": {
          "description": "Hex color: #rgb, #rgba, #rrggbb or #rrggbbaa.",
          "maxLength": 9,
          "type": "string"
        }
      },
      "required": [
        "role",
        "value"
      ],
      "type": "object"
    },
    "conditions": {
      "description": "Every listed dimension must match. Open sets: readers ignore values they don't know.",
      "properties": {
        "season": {
          "items": {
            "knownValues": [
              "winter",
              "spring",
              "summer",
              "autumn"
            ],
            "maxLength": 32,
            "type": "string"
          },
          "type": "array"
        },
        "timeOfDay": {
          "items": {
            "knownValues": [
              "dawn",
              "morning",
              "afternoon",
              "evening",
              "night"
            ],
            "maxLength": 32,
            "type": "string"
          },
          "type": "array"
        },
        "weather": {
          "items": {
            "knownValues": [
              "clear",
              "cloudy",
              "fog",
              "rain",
              "snow",
              "storm"
            ],
            "maxLength": 32,
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "font": {
      "properties": {
        "family": {
          "description": "A font family name (letters, digits, spaces, hyphens). Apps fall back to their own fonts if they don't have it.",
          "maxLength": 64,
          "type": "string"
        },
        "role": {
          "description": "A semantic role name (camelCase). Open set: readers use the roles they know and ignore the rest.",
          "knownValues": [
            "body",
            "display",
            "mono"
          ],
          "maxLength": 32,
          "type": "string"
        }
      },
      "required": [
        "role",
        "family"
      ],
      "type": "object"
    },
    "main": {
      "description": "A general-purpose visual theme: colors, fonts and corner radii by semantic role. Public, so any app can publish and use it. Apps map roles to their own styling, ignore roles they don't know, and must validate values before using them.",
      "key": "any",
      "record": {
        "properties": {
          "colorScheme": {
            "knownValues": [
              "light",
              "dark"
            ],
            "type": "string"
          },
          "colors": {
            "items": {
              "ref": "#color",
              "type": "ref"
            },
            "maxLength": 64,
            "type": "array"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "maxLength": 1000,
            "type": "string"
          },
          "emoji": {
            "description": "A small picture for theme pickers.",
            "maxGraphemes": 2,
            "maxLength": 32,
            "type": "string"
          },
          "fonts": {
            "items": {
              "ref": "#font",
              "type": "ref"
            },
            "maxLength": 16,
            "type": "array"
          },
          "name": {
            "maxLength": 64,
            "type": "string"
          },
          "radii": {
            "items": {
              "ref": "#radius",
              "type": "ref"
            },
            "maxLength": 16,
            "type": "array"
          },
          "scenes": {
            "description": "Variants for the conditions outside. The most specific matching scene wins; earlier scenes win ties.",
            "items": {
              "ref": "#scene",
              "type": "ref"
            },
            "maxLength": 64,
            "type": "array"
          }
        },
        "required": [
          "name",
          "colorScheme",
          "colors",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "radius": {
      "properties": {
        "role": {
          "description": "A semantic role name (camelCase). Open set: readers use the roles they know and ignore the rest.",
          "knownValues": [
            "small",
            "medium",
            "large",
            "card",
            "button"
          ],
          "maxLength": 32,
          "type": "string"
        },
        "value": {
          "description": "Pixels.",
          "maximum": 999,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "role",
        "value"
      ],
      "type": "object"
    },
    "scene": {
      "properties": {
        "background": {
          "accept": [
            "image/svg+xml",
            "image/png",
            "image/jpeg",
            "image/webp"
          ],
          "description": "Artwork shown behind everything.",
          "maxSize": 2000000,
          "type": "blob"
        },
        "colorScheme": {
          "knownValues": [
            "light",
            "dark"
          ],
          "type": "string"
        },
        "colors": {
          "description": "Overrides the theme's colors, role by role.",
          "items": {
            "ref": "#color",
            "type": "ref"
          },
          "maxLength": 64,
          "type": "array"
        },
        "name": {
          "maxLength": 64,
          "type": "string"
        },
        "when": {
          "ref": "#conditions",
          "type": "ref"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    }
  },
  "id": "family.pardy.design.theme",
  "lexicon": 1
}
```
