# styles.getTheme

> Read the document theme: its 12 theme colors, major and minor fonts, and the color mapping from settings.xml. A missing or malformed theme part returns the default Office theme labeled source 'fallback', with part status and diagnostics. Same theme as doc.get().theme, without the rest of the document.



- Member path: `doc.styles.getTheme(…)`
- Mutates document: no
- Idempotency: `idempotent`
- Supports tracked mode: no
- Supports dry run: no

## Expected result

Returns a StylesGetThemeResult with the theme (always present, labeled document or fallback), the theme and settings part status, and diagnostics.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {},
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {},
  "type": "object",
  "properties": {
    "theme": {
      "type": "object",
      "properties": {
        "source": {
          "enum": [
            "document",
            "fallback"
          ]
        },
        "colorScheme": {
          "type": "object"
        },
        "fontScheme": {
          "type": "object"
        },
        "colorSchemeMapping": {
          "type": "object"
        }
      },
      "additionalProperties": false,
      "required": [
        "source",
        "colorScheme"
      ]
    },
    "sourceStatus": {
      "type": "object",
      "properties": {
        "theme": {
          "enum": [
            "present",
            "missing",
            "malformed"
          ]
        },
        "settings": {
          "enum": [
            "present",
            "missing",
            "malformed"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "theme",
        "settings"
      ]
    },
    "diagnostics": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "severity": {
            "enum": [
              "info",
              "warning",
              "error"
            ]
          },
          "code": {
            "type": "string"
          },
          "part": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": [
          "severity",
          "code",
          "message"
        ]
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "theme",
    "sourceStatus",
    "diagnostics"
  ]
}
```

## Pre-apply throws

- `INVALID_INPUT`
- `CAPABILITY_UNAVAILABLE`

## Non-applied receipt codes

- None

