<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIFilter-swift.class/kaleidoscope()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:objc(cs)CIFilter(cm)kaleidoscopeFilter"
  },
  "title" : "kaleidoscope()"
}
-->

# kaleidoscope()

Creates a 12-way kaleidoscopic image from an image.

```
class func kaleidoscope() -> any CIFilter & CIKaleidoscope
```

## Return Value

The tiled image.

## Discussion

This method applies the kaleidoscope tile filter to an image. The effect produces a complex 12-way symmetrical reflected pattern from the input image.

The kaleidoscope tile filter uses the following properties:

- `inputImage`: An image with the type [`CIImage`](/documentation/CoreImage/CIImage).
- `center`: A set of coordinates marking the center of the image as a <doc://com.apple.documentation/documentation/CoreFoundation/CGPoint>.
- `angle`: A `float` representing the direction of distortion, in radians as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `count`: A `float` representing the number of reflections in the pattern as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.

The following code creates a filter that results in the creation of a kaleidoscope effect from the input image:

```swift
func kaleidoscope(inputImage: CIImage) -> CIImage {
    let kaleidoscopeEffect = CIFilter.kaleidoscope()
    kaleidoscopeEffect.inputImage = inputImage
    kaleidoscopeEffect.count = 6
    kaleidoscopeEffect.center = CGPoint(x: 150, y: 150)
    kaleidoscopeEffect.angle = 0
    return kaleidoscopeEffect.outputImage!
}
```

![Two photographs. The photo on the left is of a bouquet of colorful flowers up close with good lighting and focus. In the photo on the right, a kaleidoscope filter is applied, resulting in an small segment of the image being repeated around 360 degrees.](images/com.apple.coreimage/media-3599884@2x.png)

---

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)