14

Creating a Color Game

In the last chapter, we built a game where the user had to find words by using the letters of a larger word. In this project, we will continue the “finding” theme and build another game, where the user must find colors within a broader color.

The goal of this project will be to generate a random RGB color and then have the user manipulate separate sliders for each of the individual RGB values in order to completely match that random color. For example, there will be one slider for red, one slider for green, and one slider for blue, with each slider containing a range from 0 to 255 (the range of each RGB value). Then, the user will have to adjust those sliders to see whether they can find the exact RGB random color. ...

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.