5

Animating Colorful Kaleidoscope Effects

In this chapter, we will look at how we can animate colors with a modifier called hueRotation, where “hue” refers to the colors of the object, and “rotation” refers to the colors being rotated or animated. We will create a simple project that displays various images and then, using hueRotation, we can change or shift the colors of the images so that they will resemble somewhat of a kaleidoscope effect.

Along with hueRotation, there are some other important concepts we will explore in this project.

We will work with a Picker view for the first time, which is exactly what the name suggests; it lets the user pick from a variety of options, which can then be displayed on the screen.

Also, we will look ...

Get Animating SwiftUI Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.