extension을 통해 편의생성자를 구현해서 사용합니다. extension UIColor { convenience init(hexCode: String, alpha: CGFloat = 1.0) { var hexFormatted: String = hexCode.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines).uppercased() if hexFormatted.hasPrefix("#") { hexFormatted = String(hexFormatted.dropFirst()) } assert(hexFormatted.count == 6, "Invalid hex code used.") var rgbValue: UInt64 = 0 Scanner(strin..