revised name
This commit is contained in:
parent
9ab02bdc4b
commit
3b38433940
@ -71,149 +71,153 @@ extension UIColor {
|
||||
//--------------------------------------------------
|
||||
|
||||
/// HEX: #D52B1E
|
||||
public static let mvmRed = UIColor(named: "red")!
|
||||
public static let mvmRed = UIColor.assetColor(named: "red")
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Pink
|
||||
//--------------------------------------------------
|
||||
|
||||
/// HEX: #D90368
|
||||
public static let mvmPink = UIColor(named: "pink")!
|
||||
public static let mvmPink = UIColor.assetColor(named: "pink")
|
||||
|
||||
/// HEX: #F2ABCD
|
||||
public static let mvmPink33 = UIColor(named: "pink33")!
|
||||
public static let mvmPink33 = UIColor.assetColor(named: "pink33")
|
||||
|
||||
/// HEX: #E6589B
|
||||
public static let mvmPink66 = UIColor(named: "pink66")!
|
||||
public static let mvmPink66 = UIColor.assetColor(named: "pink66")
|
||||
|
||||
/// HEX: #B31C63
|
||||
public static let mvmPinkShade1 = UIColor(named: "pinkShade1")!
|
||||
public static let mvmPinkShade1 = UIColor.assetColor(named: "pinkShade1")
|
||||
|
||||
/// HEX: #830842
|
||||
public static let mvmPinkShade2 = UIColor(named: "pinkShade2")!
|
||||
public static let mvmPinkShade2 = UIColor.assetColor(named: "pinkShade2")
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Purple
|
||||
//--------------------------------------------------
|
||||
|
||||
/// HEX: #8C00AC
|
||||
public static let mvmPurple = UIColor(named: "purple")!
|
||||
public static let mvmPurple = UIColor.assetColor(named: "purple")
|
||||
|
||||
/// HEX: #D9ABE4
|
||||
public static let mvmPurple33 = UIColor(named: "purple33")!
|
||||
public static let mvmPurple33 = UIColor.assetColor(named: "purple33")
|
||||
|
||||
/// HEX: #B356C8
|
||||
public static let mvmPurple66 = UIColor(named: "purple66")!
|
||||
public static let mvmPurple66 = UIColor.assetColor(named: "purple66")
|
||||
|
||||
/// HEX: #6C177F
|
||||
public static let mvmPurpleShade1 = UIColor(named: "purpleShade1")!
|
||||
public static let mvmPurpleShade1 = UIColor.assetColor(named: "purpleShade1")
|
||||
|
||||
/// HEX: #4A0E58
|
||||
public static let mvmPurpleShade2 = UIColor(named: "purpleShade2")!
|
||||
public static let mvmPurpleShade2 = UIColor.assetColor(named: "purpleShade2")
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Orange
|
||||
//--------------------------------------------------
|
||||
|
||||
/// HEX: #ED7000
|
||||
public static let mvmOrange = UIColor(named: "orange")!
|
||||
public static let mvmOrange = UIColor.assetColor(named: "orange")
|
||||
|
||||
/// HEX: #CC4D0F
|
||||
public static let mvmOrangeAA = UIColor(named: "orangeAA")!
|
||||
public static let mvmOrangeAA = UIColor.assetColor(named: "orangeAA")
|
||||
|
||||
/// HEX: #F9D0AB
|
||||
public static let mvmOrange33 = UIColor(named: "orange33")!
|
||||
public static let mvmOrange33 = UIColor.assetColor(named: "orange33")
|
||||
|
||||
/// HEX: #F3A157
|
||||
public static let mvmOrange66 = UIColor(named: "orange66")!
|
||||
public static let mvmOrange66 = UIColor.assetColor(named: "orange66")
|
||||
|
||||
/// HEX: #CB5F00
|
||||
public static let mvmOrangeShade1 = UIColor(named: "orangeShade1")!
|
||||
public static let mvmOrangeShade1 = UIColor.assetColor(named: "orangeShade1")
|
||||
|
||||
/// HEX: #984700
|
||||
public static let mvmOrangeShade2 = UIColor(named: "orangeShade2")!
|
||||
public static let mvmOrangeShade2 = UIColor.assetColor(named: "orangeShade2")
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Green
|
||||
//--------------------------------------------------
|
||||
|
||||
/// HEX: #008330
|
||||
public static let mvmGreen = UIColor(named: "green")!
|
||||
public static let mvmGreen = UIColor.assetColor(named: "green")
|
||||
|
||||
/// HEX: #ABE4BF
|
||||
public static let mvmGreen33 = UIColor(named: "green33")!
|
||||
public static let mvmGreen33 = UIColor.assetColor(named: "green33")
|
||||
|
||||
/// HEX: #57C880
|
||||
public static let mvmGreen66 = UIColor(named: "green66")!
|
||||
public static let mvmGreen66 = UIColor.assetColor(named: "green66")
|
||||
|
||||
/// HEX: #0F5B25
|
||||
public static let mvmGreenShade2 = UIColor(named: "greenShade2")!
|
||||
public static let mvmGreenShade2 = UIColor.assetColor(named: "greenShade2")
|
||||
|
||||
/// HEX: #00AC3E
|
||||
public static let mvmGreenInverted = UIColor(named: "greenInverted")!
|
||||
public static let mvmGreenInverted = UIColor.assetColor(named: "greenInverted")
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Blue
|
||||
//--------------------------------------------------
|
||||
|
||||
/// HEX: #0077B4
|
||||
public static let mvmBlue = UIColor(named: "blue")!
|
||||
public static let mvmBlue = UIColor.assetColor(named: "blue")
|
||||
|
||||
/// HEX: #ABD8EF
|
||||
public static let mvmBlue33 = UIColor(named: "blue33")!
|
||||
public static let mvmBlue33 = UIColor.assetColor(named: "blue33")
|
||||
|
||||
/// HEX: #57B1DF
|
||||
public static let mvmBlue66 = UIColor(named: "blue66")!
|
||||
public static let mvmBlue66 = UIColor.assetColor(named: "blue66")
|
||||
|
||||
/// HEX: #136598
|
||||
public static let mvmBlueShade1 = UIColor(named: "blueShade1")!
|
||||
public static let mvmBlueShade1 = UIColor.assetColor(named: "blueShade1")
|
||||
|
||||
/// HEX: #0B4467
|
||||
public static let mvmBlueShade2 = UIColor(named: "blueShade2")!
|
||||
public static let mvmBlueShade2 = UIColor.assetColor(named: "blueShade2")
|
||||
|
||||
/// HEX: #0088CE
|
||||
public static let mvmBlueInverted = UIColor(named: "blueInverted")!
|
||||
public static let mvmBlueInverted = UIColor.assetColor(named: "blueInverted")
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Yellow
|
||||
//--------------------------------------------------
|
||||
|
||||
/// HEX: #FFBC3D
|
||||
public static let mvmYellow = UIColor(named: "yellow")!
|
||||
public static let mvmYellow = UIColor.assetColor(named: "yellow")
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Gray
|
||||
//--------------------------------------------------
|
||||
|
||||
/// HEX: #F6F6F6
|
||||
public static let mvmCoolGray1 = UIColor(named: "coolGray1")!
|
||||
public static let mvmCoolGray1 = UIColor.assetColor(named: "coolGray1")
|
||||
|
||||
/// HEX: #D8DADA
|
||||
public static let mvmCoolGray3 = UIColor(named: "coolGray3")!
|
||||
public static let mvmCoolGray3 = UIColor.assetColor(named: "coolGray3")
|
||||
|
||||
/// HEX: #747676
|
||||
public static let mvmCoolGray6 = UIColor(named: "coolGray6")!
|
||||
public static let mvmCoolGray6 = UIColor.assetColor(named: "coolGray6")
|
||||
|
||||
/// HEX: #333333
|
||||
public static let mvmCoolGray10 = UIColor(named: "coolGray10")!
|
||||
public static let mvmCoolGray10 = UIColor.assetColor(named: "coolGray10")
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - VZ UP Brand
|
||||
//--------------------------------------------------
|
||||
|
||||
/// HEX: #F9D542
|
||||
public static let vzupGold1 = UIColor(named: "upGold1")!
|
||||
public static let vzupGold1 = UIColor.assetColor(named: "upGold1")
|
||||
|
||||
/// HEX: #F4CA53
|
||||
public static let vzupGold2 = UIColor(named: "upGold2")!
|
||||
public static let vzupGold2 = UIColor.assetColor(named: "upGold2")
|
||||
|
||||
/// HEX: #CC9B2D
|
||||
public static let vzupGold3 = UIColor(named: "upGold3")!
|
||||
public static let vzupGold3 = UIColor.assetColor(named: "upGold3")
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Functions
|
||||
//--------------------------------------------------
|
||||
|
||||
public static func assetColor(named name: String) -> UIColor {
|
||||
return UIColor(named: name, in: MVMCoreUIUtility.bundleForMVMCoreUI(), compatibleWith: nil)!
|
||||
}
|
||||
|
||||
/// Convenience to get a grayscale UIColor where the same value is used for red, green, and blue.
|
||||
public class func grayscale(rgb: Int, alpha: CGFloat = 1.0) -> UIColor {
|
||||
|
||||
@ -299,7 +303,7 @@ extension UIColor {
|
||||
} else if numberOfComponents == 2 {
|
||||
// Monochromatic color space
|
||||
let value = Int(CGFloat(components[0]) * 255)
|
||||
|
||||
|
||||
// If alpha of color is less than 1.0 then alpha hex is relevant.
|
||||
if components[1] < 1.0 {
|
||||
let alpha = Int(CGFloat(components[1]) * 255)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user