> ## 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**

The colors that every element of the checkout inherits.

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

Each value is a CSS color string, for example `"#1A1A1A"` or `"rgb(26, 26, 26)"`. To change the colors of one element, use `CheckoutColorStyle` in a rule.

## 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 of highlights, links, and selected items. |
| `backgroundPrimary` | `String?` | The background color of the checkout. |
| `borderPrimary` | `String?` | The default border color of inputs and containers. |
| `danger` | `String?` | The color of error 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 of warning messages. |
