# CodeTheme

Source: /tuil/docs/reference/packages/code/api/code-theme
Locale: en

interface exported by @mwillbanks/tuil-code.



{/* Generated by tooling/docs/generate-reference.ts. */}

## interface [#interface]

Public interface exported by `@mwillbanks/tuil-code`.

```ts
export interface CodeTheme {
  readonly tokenStyles: Readonly<
    Record<string, { readonly foreground?: string; readonly bold?: boolean }>
  >;
  readonly diagnosticStyles: Readonly<
    Record<CodeDiagnostic["severity"], { readonly foreground: string }>
  >;
}
```

## Members [#members]

| Member             | Type                                                                                             | Required | Description                                                                                                                                     | Related types |
| ------------------ | ------------------------------------------------------------------------------------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `tokenStyles`      | `Readonly<Record<string, &#123; readonly foreground?: string; readonly bold?: boolean; &#125;>>` | Yes      | The `tokenStyles` member uses the `Readonly<Record<string, &#123; readonly foreground?: string; readonly bold?: boolean; &#125;>>` contract.    | —             |
| `diagnosticStyles` | `Readonly<Record<"info" \| "warning" \| "error", &#123; readonly foreground: string; &#125;>>`   | Yes      | The `diagnosticStyles` member uses the `Readonly<Record<"info" \| "warning" \| "error", &#123; readonly foreground: string; &#125;>>` contract. | —             |

## Parameters [#parameters]

This declaration has no public members.

## Returns [#returns]

This declaration does not return a value.

## Throws [#throws]

No thrown errors are documented for this declaration.

## Related types [#related-types]

* [`CodeDiagnostic`](/tuil/docs/reference/packages/code/api/code-diagnostic)

## Source [#source]

[View the secondary source reference](https://github.com/mwillbanks/tuil/blob/main/packages/code/src/index.ts)

## Package [#package]

[@mwillbanks/tuil-code](/tuil/docs/reference/packages/code)
