How to use Color in SwiftUI

Dig into the particulars of SwiftUI’s Color

Kelvin Tan
Swiftly Engineered iOS

--

Photo by Robert Katzki on Unsplash.

With Color, you can provide a greater sense of art to your app. Perhaps some designs should be in certain colors and not just black and white.

Apple describes the structure as “an environment-dependent color.” In this tutorial, you’ll learn more about Color in SwiftUI — chiefly what you can do with it.

Prerequisites

To follow along with this tutorial, you’ll need some basic knowledge in:

  • Swift
  • At least Xcode 11

Secondary Color

Apple made Primary and Secondary colors that can quickly be used on text in headings and so on. Below is an experiment of stacking a secondary color where it adjusts the color itself.

--

--

Kelvin Tan
Swiftly Engineered iOS

Father, husband, software engineer. Building software and building a family, one line of code and one moment at a time. 🚀💻💙 http://ko-fi.com/kelvintanzy