---
title: setStroke()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nscolor/setstroke()
---

# setStroke()

Sets the stroke color of subsequent drawing to the color object’s color.

## Declaration

```swift
func setStroke()
```

## Discussion

Discussion This method should be implemented in subclasses.

## See Also

### Drawing with colors

- [drawSwatch(in:)](appkit/nscolor/drawswatch(in:).md)
- [set()](appkit/nscolor/set().md)
- [setFill()](appkit/nscolor/setfill().md)
