Type Safely

Type Safely

Using a SwiftUI ColorPicker With CGColor To Get RGB Components

Daily Coding Tip 237

Type Safely's avatar
Type Safely
Jan 25, 2023
∙ Paid
colored pencil lined up on top of white surface
Photo by Jess Bailey on Unsplash

In yesterday’s Daily Coding Tip I was working with the ColorMind API in order to generate a colour scheme from 2 input colours.

I wanted to find a way to set the colour values that was more natural than the RGB sliders I used there, so I looked at the SwiftUI ColorPicker. While Color is dynamic, and therefore does not hav…

User's avatar

Continue reading this post for free, courtesy of Type Safely.

Or purchase a paid subscription.
© 2026 Type Safely · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture