<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKSpriteNode/spriteNodeWithColor:size:",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKSpriteNode(cm)spriteNodeWithColor:size:"
  },
  "title" : "spriteNodeWithColor:size:"
}
-->

# spriteNodeWithColor:size:

Initializes a single-color sprite.

iOS, iPadOS, Mac Catalyst, tvOS, visionOS, watchOS:

```
+ (instancetype) spriteNodeWithColor:(UIColor *) color size:(CGSize) size;
```

macOS:

```
+ (instancetype) spriteNodeWithColor:(NSColor *) color size:(CGSize) size;
```

## Parameters

`color`

The color for the resulting sprite.

`size`

The size of the sprite in points.

## Return Value

A newly initialized sprite object.

---

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)