2021-04-30 12:59:24 +00:00
|
|
|
//
|
|
|
|
// Copyright 2021 New Vector Ltd
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
2021-08-27 15:26:56 +00:00
|
|
|
|
2021-04-30 12:59:24 +00:00
|
|
|
/// Colors at https://www.figma.com/file/X4XTH9iS2KGJ2wFKDqkyed/Compound?node-id=1255%3A1104
|
2021-08-27 15:26:56 +00:00
|
|
|
public protocol Colors {
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-09-01 11:34:38 +00:00
|
|
|
associatedtype ColorType
|
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// - Focused/Active states
|
|
|
|
/// - CTAs
|
2021-09-01 11:34:38 +00:00
|
|
|
var accent: ColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// - Error messages
|
|
|
|
/// - Content requiring user attention
|
|
|
|
/// - Notification, alerts
|
2021-09-01 11:34:38 +00:00
|
|
|
var alert: ColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// - Text
|
|
|
|
/// - Icons
|
2021-09-01 11:34:38 +00:00
|
|
|
var primaryContent: ColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// - Text
|
|
|
|
/// - Icons
|
2021-09-01 11:34:38 +00:00
|
|
|
var secondaryContent: ColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// - Text
|
|
|
|
/// - Icons
|
2021-09-01 11:34:38 +00:00
|
|
|
var tertiaryContent: ColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// - Text
|
|
|
|
/// - Icons
|
2021-09-01 11:34:38 +00:00
|
|
|
var quarterlyContent: ColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-09-01 11:34:38 +00:00
|
|
|
/// - separating lines and other UI components
|
|
|
|
var quinaryContent: ColorType { get }
|
|
|
|
|
|
|
|
/// - System-based areas and backgrounds
|
|
|
|
var system: ColorType { get }
|
2021-06-29 15:05:01 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// Separating line
|
2021-09-01 11:34:38 +00:00
|
|
|
var separator: ColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
// Cards, tiles
|
2021-09-01 11:34:38 +00:00
|
|
|
var tile: ColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// Top navigation background on iOS
|
2021-09-01 11:34:38 +00:00
|
|
|
var navigation: ColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// Background UI color
|
2021-09-01 11:34:38 +00:00
|
|
|
var background: ColorType { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
2021-04-30 13:08:44 +00:00
|
|
|
/// - Names in chat timeline
|
|
|
|
/// - Avatars default states that include first name letter
|
2021-09-01 11:34:38 +00:00
|
|
|
var namesAndAvatars: [ColorType] { get }
|
2021-04-30 12:59:24 +00:00
|
|
|
|
|
|
|
}
|