Hex to SwiftUI & UIColor Converter

Turn a hex color into SwiftUI, UIKit and asset catalog code.

Support
Works Offline
Privacy First
No Login
No API

SwiftUI Color

UIKit UIColor

Xcode asset catalog — Contents.json

About the Hex to SwiftUI & UIColor Converter

Paste any hex color (3, 6 or 8 digits) and get ready-to-paste Swift code: a SwiftUI Color extension, a UIKit UIColor extension and the Contents.json body for an Xcode asset catalog color set. Alpha is preserved and a live swatch shows exactly what you will ship.

Examples

Brand red

#e04a32

Output

Color(red: 0.878, green: 0.290, blue: 0.196)

Keyboard shortcuts

  • Copy the main outputCtrl / ⌘ + Shift + C
  • Download the resultCtrl / ⌘ + S
  • Share this toolCtrl / ⌘ + Shift + S
  • Reset the inputsAlt + R
  • Open the tool search paletteCtrl / ⌘ + K

Related tools

Frequently asked questions

Version 1.0.0 · Updated 2026-08-23 · Runs entirely in your browser