Closed kevinSuttle closed 8 years ago
Hi! Do you have a link to the SwiftUIRGB format?
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIColor_Class https://www.ralfebert.de/snippets/ios/swift-uicolor-picker/
Sure, here's an example comparing hex.
I've seen UIColor
and SwiftUIColorRGB
used interchangeably.
I have seen it as both in Sip for Mac.
hex: '#ffd2dd',
SwiftUIColorRGB: 'UIColor(red:1, green:0.823, blue:0.866, alpha:1)'
All that format is is just the RGB values/255.
red: 0xFF/0xFF = 1
green: 0xD2/0xFF = 0.823
blue: 0xDD/0xFF = 0.866
Could just do
colorConver['something']['rgb'](...).map(function (c) { return c / 255; });
Not sure if this is specific enough to warrant a conversion for it, since technically we've already converted to RGB.
Ah that's a good point. Are there output formats (as opposed to conversions)?
Aha I see. Thanks @Qix-!
No problem :) Keep 'em coming!
Lots of Swift color formats, but SwiftUIRGB seems to be the most prominent I believe. Is there a more common equivalent or could color-convert output this format as well?