---
title: "setBorderColor(_:for:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextblock/setbordercolor(_:for:)"
---

# setBorderColor(_:for:)

Sets the border color of the specified edge of the text block.

## Declaration

```swift
func setBorderColor(_ color: NSColor?, for edge: NSRectEdge)
```

## Parameters

- `color`: The new color.
- `edge`: The edge whose color is to be set.

## Discussion

Discussion This setting has no visible effect unless the border width is larger than the default, which is 0.

## See Also

### Related Documentation

- [setWidth(_:type:for:)](appkit/nstextblock/setwidth(_:type:for:).md)

### Working with color

- [backgroundColor](appkit/nstextblock/backgroundcolor.md)
- [setBorderColor(_:)](appkit/nstextblock/setbordercolor(_:).md)
