<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PencilKit",
  "identifier" : "/documentation/PencilKit/PKInkingTool-swift.struct/init(_:color:width:)-2l7v",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "PencilKit"
    ],
    "preciseIdentifier" : "s:9PencilKit12PKInkingToolV_5color5widthA2C7InkTypeO_So7UIColorC14CoreFoundation7CGFloatVSgtcfc"
  },
  "title" : "init(_:color:width:)"
}
-->

# init(_:color:width:)

Creates an ink tool object with the specified color and line width values.

```
init(_ inkType: PKInkingTool.InkType, color: UIColor = UIColor.black, width: CGFloat? = nil)
```

## Parameters

`inkType`

The shape of the tool, which can be [`PKInkingTool.InkType.marker`](/documentation/PencilKit/PKInkingTool-swift.struct/InkType-swift.enum/marker), [`PKInkingTool.InkType.pen`](/documentation/PencilKit/PKInkingTool-swift.struct/InkType-swift.enum/pen), or [`PKInkingTool.InkType.pencil`](/documentation/PencilKit/PKInkingTool-swift.struct/InkType-swift.enum/pencil).

`color`

The color to apply to drawn lines.

`width`

The base width to apply to any drawn lines. The value in the `inkType` parameter and input from Apple Pencil affects the final width.

## Discussion

This initializer creates a new inking tool with the specified type, color, and width.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)