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

# CheckoutColorStyle

> Swift Structure

**Structure**

The colors of one checkout element.

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

Each element reads only the keys that apply to it. A key the element does not use has no effect.

## Initializers

### init(from:)

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

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

### init(text:background:backgroundPrimary:border:boxShadow:placeholder:)

Creates a color style from CSS color strings.

```swift theme={null}
init(text: String? = nil, background: String? = nil, backgroundPrimary: String? = nil, border: String? = nil, boxShadow: String? = nil, placeholder: String? = nil)
```

Use `init(text:background:backgroundPrimary:border:boxShadow:placeholder:)` instead.

### init(text:background:backgroundPrimary:border:boxShadow:placeholder:)

Creates a color style.

```swift theme={null}
init(text: CheckoutColor? = nil, background: CheckoutColor? = nil, backgroundPrimary: CheckoutColor? = nil, border: CheckoutColor? = nil, boxShadow: String? = nil, placeholder: CheckoutColor? = nil)
```

## Instance Properties

| Property | Type | Description |
| - | - | - |
| `background` | `String?` | The background color as a CSS string. |
| `backgroundColor` | `CheckoutColor?` | The background color. |
| `backgroundPrimary` | `String?` | The primary background color as a CSS string. |
| `backgroundPrimaryColor` | `CheckoutColor?` | The primary background color. |
| `border` | `String?` | The border color as a CSS string. |
| `borderColor` | `CheckoutColor?` | The border color. |
| `boxShadow` | `String?` | The CSS `box-shadow` value, for example `"0 0 0 2px #0066FF"`. |
| `placeholder` | `String?` | The placeholder text color as a CSS string. |
| `placeholderColor` | `CheckoutColor?` | The placeholder text color. |
| `text` | `String?` | The text color as a CSS string. |
| `textColor` | `CheckoutColor?` | The text color. |
