> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CheckoutVariablesColorStyle

> Swift Structure

**Structure**

Global color variables. These use different keys than the per-element `CheckoutColorStyle` used in rules: the checkout reads `textPrimary`/`textSecondary`/`borderPrimary`/etc. at the variables level.

```swift theme={null}
struct CheckoutVariablesColorStyle
```

## Initializers

### init(from:)

Inherited from `Decodable.init(from:)`.

```swift theme={null}
init(from decoder: any Decoder) throws
```

### init(textPrimary:textSecondary:backgroundPrimary:borderPrimary:danger:warning:accent:)

Creates the global colors.

```swift theme={null}
init(textPrimary: String? = nil, textSecondary: String? = nil, backgroundPrimary: String? = nil, borderPrimary: String? = nil, danger: String? = nil, warning: String? = nil, accent: String? = nil)
```

## Instance Properties

| Property            | Type      | Description                                                     |
| ------------------- | --------- | --------------------------------------------------------------- |
| `accent`            | `String?` | The accent color for highlights, links, and the selected state. |
| `backgroundPrimary` | `String?` | The background color of the checkout.                           |
| `borderPrimary`     | `String?` | The default border color of inputs and containers.              |
| `danger`            | `String?` | The color for error states and messages.                        |
| `textPrimary`       | `String?` | The color of primary text, such as headings and amounts.        |
| `textSecondary`     | `String?` | The color of secondary text, such as helper text and captions.  |
| `warning`           | `String?` | The color for warning states and messages.                      |
