---
title: setFill()
framework: uikit
role: symbol
role_heading: Instance Method
path: uikit/uicolor/setfill()
---

# setFill()

Sets the color of subsequent fill operations to the color that the receiver represents.

## Declaration

```swift
func setFill()
```

## Discussion

Discussion If you subclass UIColor, you must implement this method in your subclass. Your custom implementation should modify the fill color in the current graphics context by setting it to the color represented by the receiver.

## See Also

### Applying the color to the drawing environment

- [Customizing drawings](uikit/customizing-drawings.md)
- [set()](uikit/uicolor/set().md)
- [setStroke()](uikit/uicolor/setstroke().md)
