---
title: Gradient.ColorSpace
framework: swiftui
role: symbol
role_heading: Structure
path: swiftui/gradient/colorspace
---

# Gradient.ColorSpace

A method of interpolating between the colors in a gradient.

## Declaration

```swift
struct ColorSpace
```

## Topics

### Getting an interpolation method

- [device](swiftui/gradient/colorspace/device.md)
- [perceptual](swiftui/gradient/colorspace/perceptual.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Working with color spaces

- [colorSpace(_:)](swiftui/gradient/colorspace(_:).md)
