Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Using a SwiftUI ColorPicker With CGColor To Get RGB Components

Using a SwiftUI ColorPicker With CGColor To Get RGB Components

Daily Coding Tip 237

Type Safely's avatar
Type Safely
Jan 25, 2023
∙ Paid

Share this post

Type Safely
Type Safely
Using a SwiftUI ColorPicker With CGColor To Get RGB Components
Share
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…

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share