---
title: "init(style:gaugeColors:gaugeColorLocations:fillFraction:)"
framework: clockkit
role: symbol
role_heading: Initializer
path: "clockkit/clksimplegaugeprovider/init(style:gaugecolors:gaugecolorlocations:fillfraction:)"
---

# init(style:gaugeColors:gaugeColorLocations:fillFraction:)

Creates a multicolor gauge.

## Declaration

```swift
convenience init(style: CLKGaugeProviderStyle, gaugeColors: [UIColor]?, gaugeColorLocations: [NSNumber]?, fillFraction: Float)
```

## Parameters

- `style`: The style defining the gauge’s visual appearance. For a list of valid styles, see doc://com.apple.clockkit/documentation/ClockKit/CLKGaugeProviderStyle.
- `gaugeColors`: The gauge’s colors. These colors are displayed as a gradient.
- `gaugeColorLocations`: The location of each color along the gauge. Locations are values between 0.0 and 1.0. If nil, the colors are evenly spaced along the gauge.
- `fillFraction`: The value displayed by the gauge. Use a value between 0.0 and 1.0. For an empty gauge, use doc://com.apple.clockkit/documentation/ClockKit/CLKSimpleGaugeProviderFillFractionEmpty.

## Return Value

Return Value A newly instantiated multicolor gauge.

## Discussion

Discussion If you provide both colors and locations, then the gaugeColors and gaugeColorLocations arrays must be the same length.

## See Also

### Creating a Simple Gauge Provider

- [init(style:gaugeColor:fillFraction:)](clockkit/clksimplegaugeprovider/init(style:gaugecolor:fillfraction:).md)
