The formats above
Web notation: rgb(57, 77, 254), rgba(57, 77, 254, 1) and hsl(234, 99%, 61%), where hue is degrees and the other two are percentages.
Normalized channels: 0.224, 0.302, 0.996, each byte divided by 255. SwiftUI wants floats in that range, not bytes.
Apple types: Color(.sRGB, red: 0.224, green: 0.302, blue: 0.996, opacity: 1) for SwiftUI, UIColor(red: 57/255, ...) for UIKit, NSColor(srgbRed: 57/255, ...) for AppKit.
CSS variable and Tailwind: --brand: #394dfe; plus the nearest class in the Tailwind palette.
Shorthand and alpha both work. Three-digit codes expand by doubling each digit, so #39F is #3399FF. Eight-digit codes add a fourth pair for alpha, where the byte is round(opacity x 255) in hex, so half opacity is 80. Hex alpha on a background leaves text and child elements at full opacity, while the CSS opacity property fades those too.
Two traps in the output
NSColor has a separate initializer per color space, and they produce visibly different colors on screen from the same three numbers. deviceRed: is device-dependent and skips ColorSync. srgbRed: pins sRGB, which is what Xcode asset catalogs and design files assume. Pick that one and the paste matches the mockup.
Tailwind has no exact hex lookup. Matchers compute CIEDE2000 perceptual distance against the palette, and anything under 2.0 is indistinguishable to the eye. Tailwind v4 redefined its default palette in oklch() for the P3 gamut in 2025, so treat any hex-to-Tailwind answer as the nearest color rather than the same one.
On a Mac, Klipto reads the format you copied and offers the alternatives in the paste preview, so a hex code, an hsl() string and a Swift initializer all produce the same row.