let red = UIColor.red
print(red.cgColor.colorSpace!)
输出为CCD_ 1。
如何获得像profile这样的单个值(名称sRGB IEC61966-2.1
(作为字符串?
BTW,我认为,它解决了您的问题:
let color = UIColor.red
let value = String(describing: color.cgColor.colorSpace)
let profileName = value.split(separator: ";")[2].trimmingCharacters(in: .whitespacesAndNewlines)
print(profileName)
sRGB IEC61966-2.1