From f0431438c13f52995031394aae1a0dc44e155757 Mon Sep 17 00:00:00 2001
From: Mustafa Merza <mustafa.merza95@gmail.com>
Date: Thu, 15 Aug 2024 13:35:10 +0300
Subject: [PATCH] - Added secondary and tertiary colors from Figma.

---
 .../Core/Extensions/Style/Color+Colors.swift  |  6 +++
 .../Extensions/Style/UIColors+Colors.swift    |  6 +++
 .../Core/Presentation/Styles/ColorStyle.swift | 27 +++++++++++++
 .../Colors/Base.colorset/Contents.json        |  2 +-
 .../Colors.xcassets/Colors/Main/Contents.json |  6 +++
 .../Primary Color.colorset/Contents.json      |  0
 .../Main/Primary Text.colorset/Contents.json  | 20 ++++++++++
 .../Secondary Color.colorset/Contents.json    | 38 +++++++++++++++++++
 .../Secondary Text.colorset/Contents.json     | 38 +++++++++++++++++++
 .../Tertiary Color.colorset/Contents.json     | 38 +++++++++++++++++++
 .../Main/Tertiary Text.colorset/Contents.json | 38 +++++++++++++++++++
 11 files changed, 218 insertions(+), 1 deletion(-)
 create mode 100644 MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Contents.json
 rename MiniScanner/Core/Resources/Colors.xcassets/Colors/{ => Main}/Primary Color.colorset/Contents.json (100%)
 create mode 100644 MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Primary Text.colorset/Contents.json
 create mode 100644 MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Secondary Color.colorset/Contents.json
 create mode 100644 MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Secondary Text.colorset/Contents.json
 create mode 100644 MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Tertiary Color.colorset/Contents.json
 create mode 100644 MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Tertiary Text.colorset/Contents.json

diff --git a/MiniScanner/Core/Extensions/Style/Color+Colors.swift b/MiniScanner/Core/Extensions/Style/Color+Colors.swift
index c09261b..169ec2c 100644
--- a/MiniScanner/Core/Extensions/Style/Color+Colors.swift
+++ b/MiniScanner/Core/Extensions/Style/Color+Colors.swift
@@ -27,6 +27,12 @@ extension Color {
 extension Color {
     
     static let primary = Color(.primary)
+    static let secondary = Color(.secondary)
+    static let tertiary = Color(.tertiary)
+    
+    static let primaryText = Color(.primaryText)
+    static let secondaryText = Color(.secondaryText)
+    static let tertiaryText = Color(.tertiaryText)
     
     static let statusTrue = Color(.statusTrue)
     
diff --git a/MiniScanner/Core/Extensions/Style/UIColors+Colors.swift b/MiniScanner/Core/Extensions/Style/UIColors+Colors.swift
index 196a57e..d87b26b 100644
--- a/MiniScanner/Core/Extensions/Style/UIColors+Colors.swift
+++ b/MiniScanner/Core/Extensions/Style/UIColors+Colors.swift
@@ -27,6 +27,12 @@ extension UIColor {
 extension UIColor {
     
     static let primary = UIColor(resource: .primary)
+    static let secondary = UIColor(resource: .secondary)
+    static let tertiary = UIColor(resource: .tertiary)
+    
+    static let primaryText = UIColor(resource: .primaryText)
+    static let secondaryText = UIColor(resource: .secondaryText)
+    static let tertiaryText = UIColor(resource: .tertiaryText)
     
     static let statusTrue = UIColor(resource: .statusTrue)
     
diff --git a/MiniScanner/Core/Presentation/Styles/ColorStyle.swift b/MiniScanner/Core/Presentation/Styles/ColorStyle.swift
index d5d4c65..f1cf2f9 100644
--- a/MiniScanner/Core/Presentation/Styles/ColorStyle.swift
+++ b/MiniScanner/Core/Presentation/Styles/ColorStyle.swift
@@ -11,6 +11,13 @@ import SwiftUI
 enum ColorStyle {
     
     case primary
+    case secondary
+    case tertiary
+    
+    case primaryText
+    case secondaryText
+    case tertiaryText
+    
     case statusTrue
     case statusFalse
     case statusAlert
@@ -40,6 +47,16 @@ extension ColorStyle {
         switch self {
         case .primary:
                 .primary
+        case .secondary:
+                .secondary
+        case .tertiary:
+                .tertiary
+        case .primaryText:
+                .primaryText
+        case .secondaryText:
+                .secondaryText
+        case .tertiaryText:
+                .tertiaryText
         case .statusTrue:
                 .statusTrue
         case .statusFalse:
@@ -88,6 +105,16 @@ extension ColorStyle {
         switch self {
         case .primary:
                 .primary
+        case .secondary:
+                .secondary
+        case .tertiary:
+                .tertiary
+        case .primaryText:
+                .primaryText
+        case .secondaryText:
+                .secondaryText
+        case .tertiaryText:
+                .tertiaryText
         case .statusTrue:
                 .statusTrue
         case .statusFalse:
diff --git a/MiniScanner/Core/Resources/Colors.xcassets/Colors/Base.colorset/Contents.json b/MiniScanner/Core/Resources/Colors.xcassets/Colors/Base.colorset/Contents.json
index 13dc719..d0fd283 100644
--- a/MiniScanner/Core/Resources/Colors.xcassets/Colors/Base.colorset/Contents.json
+++ b/MiniScanner/Core/Resources/Colors.xcassets/Colors/Base.colorset/Contents.json
@@ -7,7 +7,7 @@
           "alpha" : "1.000",
           "blue" : "0xFF",
           "green" : "0xFF",
-          "red" : "0xFE"
+          "red" : "0xFF"
         }
       },
       "idiom" : "universal"
diff --git a/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Contents.json b/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Contents.json
new file mode 100644
index 0000000..73c0059
--- /dev/null
+++ b/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Contents.json
@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
diff --git a/MiniScanner/Core/Resources/Colors.xcassets/Colors/Primary Color.colorset/Contents.json b/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Primary Color.colorset/Contents.json
similarity index 100%
rename from MiniScanner/Core/Resources/Colors.xcassets/Colors/Primary Color.colorset/Contents.json
rename to MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Primary Color.colorset/Contents.json
diff --git a/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Primary Text.colorset/Contents.json b/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Primary Text.colorset/Contents.json
new file mode 100644
index 0000000..a61d481
--- /dev/null
+++ b/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Primary Text.colorset/Contents.json	
@@ -0,0 +1,20 @@
+{
+  "colors" : [
+    {
+      "color" : {
+        "color-space" : "srgb",
+        "components" : {
+          "alpha" : "1.000",
+          "blue" : "0xFF",
+          "green" : "0xFF",
+          "red" : "0xFE"
+        }
+      },
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
diff --git a/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Secondary Color.colorset/Contents.json b/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Secondary Color.colorset/Contents.json
new file mode 100644
index 0000000..2701a82
--- /dev/null
+++ b/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Secondary Color.colorset/Contents.json	
@@ -0,0 +1,38 @@
+{
+  "colors" : [
+    {
+      "color" : {
+        "color-space" : "srgb",
+        "components" : {
+          "alpha" : "1.000",
+          "blue" : "0x2E",
+          "green" : "0x2C",
+          "red" : "0x2C"
+        }
+      },
+      "idiom" : "universal"
+    },
+    {
+      "appearances" : [
+        {
+          "appearance" : "luminosity",
+          "value" : "dark"
+        }
+      ],
+      "color" : {
+        "color-space" : "srgb",
+        "components" : {
+          "alpha" : "1.000",
+          "blue" : "0xF6",
+          "green" : "0xF1",
+          "red" : "0xF1"
+        }
+      },
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
diff --git a/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Secondary Text.colorset/Contents.json b/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Secondary Text.colorset/Contents.json
new file mode 100644
index 0000000..b84ce47
--- /dev/null
+++ b/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Secondary Text.colorset/Contents.json	
@@ -0,0 +1,38 @@
+{
+  "colors" : [
+    {
+      "color" : {
+        "color-space" : "srgb",
+        "components" : {
+          "alpha" : "1.000",
+          "blue" : "0xFF",
+          "green" : "0xFF",
+          "red" : "0xFF"
+        }
+      },
+      "idiom" : "universal"
+    },
+    {
+      "appearances" : [
+        {
+          "appearance" : "luminosity",
+          "value" : "dark"
+        }
+      ],
+      "color" : {
+        "color-space" : "srgb",
+        "components" : {
+          "alpha" : "1.000",
+          "blue" : "0x2D",
+          "green" : "0x2B",
+          "red" : "0x2B"
+        }
+      },
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
diff --git a/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Tertiary Color.colorset/Contents.json b/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Tertiary Color.colorset/Contents.json
new file mode 100644
index 0000000..da359ab
--- /dev/null
+++ b/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Tertiary Color.colorset/Contents.json	
@@ -0,0 +1,38 @@
+{
+  "colors" : [
+    {
+      "color" : {
+        "color-space" : "srgb",
+        "components" : {
+          "alpha" : "1.000",
+          "blue" : "0xF7",
+          "green" : "0xF2",
+          "red" : "0xF2"
+        }
+      },
+      "idiom" : "universal"
+    },
+    {
+      "appearances" : [
+        {
+          "appearance" : "luminosity",
+          "value" : "dark"
+        }
+      ],
+      "color" : {
+        "color-space" : "srgb",
+        "components" : {
+          "alpha" : "1.000",
+          "blue" : "0x2D",
+          "green" : "0x2B",
+          "red" : "0x2B"
+        }
+      },
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
diff --git a/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Tertiary Text.colorset/Contents.json b/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Tertiary Text.colorset/Contents.json
new file mode 100644
index 0000000..4b7872a
--- /dev/null
+++ b/MiniScanner/Core/Resources/Colors.xcassets/Colors/Main/Tertiary Text.colorset/Contents.json	
@@ -0,0 +1,38 @@
+{
+  "colors" : [
+    {
+      "color" : {
+        "color-space" : "srgb",
+        "components" : {
+          "alpha" : "1.000",
+          "blue" : "0x2D",
+          "green" : "0x2B",
+          "red" : "0x2B"
+        }
+      },
+      "idiom" : "universal"
+    },
+    {
+      "appearances" : [
+        {
+          "appearance" : "luminosity",
+          "value" : "dark"
+        }
+      ],
+      "color" : {
+        "color-space" : "srgb",
+        "components" : {
+          "alpha" : "1.000",
+          "blue" : "0xFF",
+          "green" : "0xFF",
+          "red" : "0xFF"
+        }
+      },
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
-- 
GitLab