# Pick a color on screen and paste it as SwiftUI

You have a color in a mockup, a competitor's app or a screenshot, and you want it in Xcode. Set SupaPick's default format to SwiftUI Color and every pick lands on your clipboard as `Color(red: 0.227, green: 0.482, blue: 0.835)`, ready to paste. On a wide-gamut display you can copy the Display P3 version instead, with the real P3 values.

- [Download the free trial](https://download.supapick.app/SupaPick-1.0.0.zip)
- [Buy for $4.99](https://buy.stripe.com/8x2eVcds06Ow8T8aBB6wE0d)

macOS 14 or later · [Signed and notarized by Apple](https://supatools.app/security) · Free for 7 days · 14-day refund

## How to do it with SupaPick

1. Click the eyedropper in the menu bar, open **Default Format** and choose **SwiftUI Color** or **SwiftUI Color (Display P3)**. NSColor and UIColor are there too.
2. Press `⌃⌥C` and click the color. The Swift code is on your clipboard.
3. To build a set, go to **Recent**, open a color and choose **Pin to** → **Favorites** or **New Palette…**. Pinned colors are named after their nearest Tailwind class, and **Rename…** changes that.
4. Open the palette and choose **Export** → **Swift** → **Copy** or **Save…** for an `extension Color` with one `static let` per color.

## With what's built into macOS

Xcode has its own color tools. You can add a Color Set to an asset catalog and use the Colors window's eyedropper to sample from the screen, which gives you a named color in the catalog rather than code. That is the right home for a design system's colors, and SupaPick doesn't replace it.

For a quick `Color(…)` in a view or a preview, Digital Color Meter gets you halfway. It shows the values as decimals, percentages or floats, but you copy them out and type the initializer yourself, three numbers at a time.

SupaPick writes the initializer for you with three decimals per channel: `Color(red:green:blue:)` for sRGB, `Color(.displayP3, red:green:blue:)` for P3, `NSColor(srgbRed:…)` for AppKit and `UIColor(red:…)` for UIKit.

## Questions and answers

**Is the Display P3 value just the sRGB value relabeled?**

No. SupaPick reads the pixel in your display's own color space and converts it to Display P3 separately. On a P3 display, colors outside sRGB keep their P3 values in that format.

**What does the Swift export look like?**

An `import SwiftUI` line and an `extension Color` with a `static let` per color, such as `static let sky600 = Color(red: …)`. Each name comes from that color's name in the palette, made safe for Swift.

**Is SupaPick free?**

Partly. Everything is unlocked for 7 days, no account needed. After that the loupe, HEX copy and HEX history stay free for good. Every other format, palettes with export and the contrast panel need a license key, which is $4.99 once for three Macs.

## Related

- [Color Picker for Mac: Any Pixel, Copied as Code](https://supapick.app/color-picker-mac)
- [Pick a Color From Your Screen on Mac in One Click](https://supapick.app/pick-color-from-screen-mac)
- [HEX Color Picker for Mac: Copy #RRGGBB From Any Pixel](https://supapick.app/hex-color-picker-mac)
- [SupaPick alternatives](https://supapick.app/alternatives)
- [More about SupaPick](https://supapick.app/)
