mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Fixup missing colours and use resolved colours in UIKit.
Fix the confetti colour when using DesignKit. Pin swift packages. Fix UI tests target.
This commit is contained in:
@@ -65,9 +65,12 @@ fileprivate extension Color {
|
||||
///
|
||||
/// SceneKit works in a colorspace with a linear gamma, which is why this conversion is necessary.
|
||||
var floatComponents: [Float]? {
|
||||
// Get the CGColor from a UIColor as it is nil on Color when loaded from an asset catalog.
|
||||
let cgColor = UIColor(self).cgColor
|
||||
|
||||
guard
|
||||
let colorSpace = CGColorSpace(name: CGColorSpace.extendedLinearSRGB),
|
||||
let linearColor = cgColor?.converted(to: colorSpace, intent: .defaultIntent, options: nil),
|
||||
let linearColor = cgColor.converted(to: colorSpace, intent: .defaultIntent, options: nil),
|
||||
let components = linearColor.components
|
||||
else { return nil }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user