added the "links" color from figma

This commit is contained in:
Mauro Romito
2023-01-12 16:20:38 +01:00
parent 0e3de0ebe1
commit cc14d25d34
6 changed files with 16 additions and 2 deletions

View File

@@ -48,5 +48,7 @@ public struct ColorValues: Colors {
public let ems: UIColor
public let links: UIColor
public let namesAndAvatars: [UIColor]
}

View File

@@ -67,6 +67,10 @@ public protocol Colors {
/// Global color: The EMS brand's purple colour.
var ems: ColorType { get }
/// - Links
/// - Hyperlinks
var links: ColorType { get }
/// - Names in chat timeline
/// - Avatars default states that include first name letter
var namesAndAvatars: [ColorType] { get }

View File

@@ -21,7 +21,7 @@ import SwiftUI
Struct for holding colors for use in SwiftUI.
*/
public struct ColorSwiftUI: Colors {
public let accent: Color
public let alert: Color
@@ -48,8 +48,10 @@ public struct ColorSwiftUI: Colors {
public var ems: Color
public let namesAndAvatars: [Color]
public let links: Color
public let namesAndAvatars: [Color]
init(values: ColorValues) {
accent = Color(values.accent)
alert = Color(values.alert)
@@ -64,6 +66,7 @@ public struct ColorSwiftUI: Colors {
navigation = Color(values.navigation)
background = Color(values.background)
ems = Color(values.ems)
links = Color(values.links)
namesAndAvatars = values.namesAndAvatars.map({ Color($0) })
}
}

View File

@@ -45,6 +45,8 @@ import UIKit
public let navigation: UIColor
public let background: UIColor
public let links: UIColor
public let namesAndAvatars: [UIColor]
@@ -61,6 +63,7 @@ import UIKit
tile = values.tile
navigation = values.navigation
background = values.background
links = values.links
namesAndAvatars = values.namesAndAvatars
}
}