damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

DamusColors.swift (2467B)


      1 //
      2 //  DamusColors.swift
      3 //  damus
      4 //
      5 //  Created by William Casarin on 2023-03-27.
      6 //
      7 
      8 import Foundation
      9 import SwiftUI
     10 
     11 class DamusColors {
     12     static let adaptableGrey = Color("DamusAdaptableGrey")
     13     static let adaptableBlack = Color("DamusAdaptableBlack")
     14     static let adaptableWhite = Color("DamusAdaptableWhite")
     15     static let white = Color("DamusWhite")
     16     static let black = Color("DamusBlack")
     17     static let brown = Color("DamusBrown")
     18     static let yellow = Color("DamusYellow")
     19     static let gold = hex_col(r: 226, g: 168, b: 0)
     20     static let lightGrey = Color("DamusLightGrey")
     21     static let mediumGrey = Color("DamusMediumGrey")
     22     static let darkGrey = Color("DamusDarkGrey")
     23     static let green = Color("DamusGreen")
     24     static let purple = Color("DamusPurple")
     25     static let deepPurple = Color("DamusDeepPurple")
     26     static let blue = Color("DamusBlue")
     27     static let success = Color("DamusSuccessPrimary")
     28     static let successSecondary = Color("DamusSuccessSecondary")
     29     static let successTertiary = Color("DamusSuccessTertiary")
     30     static let successQuaternary = Color("DamusSuccessQuaternary")
     31     static let successBorder = Color("DamusSuccessBorder")
     32     static let warning = Color("DamusWarningPrimary")
     33     static let warningSecondary = Color("DamusWarningSecondary")
     34     static let warningTertiary = Color("DamusWarningTertiary")
     35     static let warningQuaternary = Color("DamusWarningQuaternary")
     36     static let warningBorder = Color("DamusWarningBorder")
     37     static let danger = Color("DamusDangerPrimary")
     38     static let dangerSecondary = Color("DamusDangerSecondary")
     39     static let dangerTertiary = Color("DamusDangerTertiary")
     40     static let dangerQuaternary = Color("DamusDangerQuaternary")
     41     static let dangerBorder = Color("DamusDangerBorder")
     42     static let neutral1 = Color("DamusNeutral1")
     43     static let neutral3 = Color("DamusNeutral3")
     44     static let neutral6 = Color("DamusNeutral6")
     45     static let pink = Color(red: 211/255.0, green: 76/255.0, blue: 217/255.0)
     46     static let lighterPink = Color(red: 248/255.0, green: 105/255.0, blue: 182/255.0)
     47     static let lightBackgroundPink = Color(red: 0xF8/255.0, green: 0xE7/255.0, blue: 0xF8/255.0)
     48 }
     49 
     50 func hex_col(r: UInt8, g: UInt8, b: UInt8) -> Color {
     51     return Color(.sRGB,
     52                  red: Double(r) / Double(0xff),
     53                  green: Double(g) / Double(0xff),
     54                  blue: Double(b) / Double(0xff),
     55                  opacity: 1.0)
     56 }