diff --git a/MiniScanner.xcodeproj/project.pbxproj b/MiniScanner.xcodeproj/project.pbxproj index df3087a6e5f7c57b623042a692aeb2a519c0e8a1..cbf5299cfdd11772ea25164335edda60279953e2 100644 --- a/MiniScanner.xcodeproj/project.pbxproj +++ b/MiniScanner.xcodeproj/project.pbxproj @@ -190,6 +190,9 @@ 672C46D12C47EA7400497EF0 /* ChangeColorSchemeUseCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 672C46D02C47EA7400497EF0 /* ChangeColorSchemeUseCase.swift */; }; 672C46D32C47EA8F00497EF0 /* SupportedColorScheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 672C46D22C47EA8F00497EF0 /* SupportedColorScheme.swift */; }; 672C46D52C47F8D000497EF0 /* HandleAppStartUseCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 672C46D42C47F8D000497EF0 /* HandleAppStartUseCase.swift */; }; + 672C46D72C48006200497EF0 /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 672C46D62C48006200497EF0 /* Colors.xcassets */; }; + 672C46DA2C48018400497EF0 /* Color+Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 672C46D92C48018400497EF0 /* Color+Colors.swift */; }; + 672C46DC2C48018D00497EF0 /* UIColors+Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 672C46DB2C48018D00497EF0 /* UIColors+Colors.swift */; }; B827E5196CC419E773B843E1 /* Pods_MiniScanner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9A37DC9F9A8E3AF632DFB98 /* Pods_MiniScanner.framework */; }; EC0CF1FE254D8BBF00888722 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC0CF1FD254D8BBF00888722 /* AppDelegate.swift */; }; EC0CF200254D8BBF00888722 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC0CF1FF254D8BBF00888722 /* SceneDelegate.swift */; }; @@ -430,6 +433,9 @@ 672C46D02C47EA7400497EF0 /* ChangeColorSchemeUseCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangeColorSchemeUseCase.swift; sourceTree = "<group>"; }; 672C46D22C47EA8F00497EF0 /* SupportedColorScheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SupportedColorScheme.swift; sourceTree = "<group>"; }; 672C46D42C47F8D000497EF0 /* HandleAppStartUseCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HandleAppStartUseCase.swift; sourceTree = "<group>"; }; + 672C46D62C48006200497EF0 /* Colors.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Colors.xcassets; sourceTree = "<group>"; }; + 672C46D92C48018400497EF0 /* Color+Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+Colors.swift"; sourceTree = "<group>"; }; + 672C46DB2C48018D00497EF0 /* UIColors+Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColors+Colors.swift"; sourceTree = "<group>"; }; E8AF4FB39674DF589D719DCF /* Pods-MiniScanner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MiniScanner.release.xcconfig"; path = "Target Support Files/Pods-MiniScanner/Pods-MiniScanner.release.xcconfig"; sourceTree = "<group>"; }; E9A37DC9F9A8E3AF632DFB98 /* Pods_MiniScanner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MiniScanner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; EC0CF1FA254D8BBF00888722 /* MiniScanner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MiniScanner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1085,6 +1091,15 @@ path = ColorScheme; sourceTree = "<group>"; }; + 672C46D82C48017C00497EF0 /* Style */ = { + isa = PBXGroup; + children = ( + 672C46D92C48018400497EF0 /* Color+Colors.swift */, + 672C46DB2C48018D00497EF0 /* UIColors+Colors.swift */, + ); + path = Style; + sourceTree = "<group>"; + }; 98E49D3F46C8E62718825860 /* Pods */ = { isa = PBXGroup; children = ( @@ -1175,6 +1190,7 @@ EC8A9B0A254DC2FD00F9AF99 /* Extensions */ = { isa = PBXGroup; children = ( + 672C46D82C48017C00497EF0 /* Style */, 672C46492C47BD8800497EF0 /* String+StringKeys.swift */, EC0CF21C254D8F3900888722 /* String+Extensions.swift */, EC8A9AFF254DBFC600F9AF99 /* UserDefaults+Extensions.swift */, @@ -1205,6 +1221,7 @@ 53D9D1C12C1AF521004D1C1C /* MyExtention.swift */, 53F21F932C1377B900172BFC /* Fonts */, EC0CF206254D8BC000888722 /* Assets.xcassets */, + 672C46D62C48006200497EF0 /* Colors.xcassets */, EC0CF1FD254D8BBF00888722 /* AppDelegate.swift */, EC0CF1FF254D8BBF00888722 /* SceneDelegate.swift */, EC0CF208254D8BC000888722 /* LaunchScreen.storyboard */, @@ -1327,6 +1344,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 672C46D72C48006200497EF0 /* Colors.xcassets in Resources */, 5359841B2C145E55003EB6ED /* DocumentsTableViewCell.xib in Resources */, 53014FAD2C11A8E80071CE39 /* rotate.png in Resources */, 53014FB02C11A8E80071CE39 /* flashUnavailable@2x.png in Resources */, @@ -1434,6 +1452,7 @@ 539996922C27130000671340 /* ConstraintLayoutGuide.swift in Sources */, 539996A32C27130000671340 /* ConstraintLayoutSupportDSL.swift in Sources */, 53D9D1C52C1AF521004D1C1C /* MyExtention.swift in Sources */, + 672C46DC2C48018D00497EF0 /* UIColors+Colors.swift in Sources */, 672C46662C47C74C00497EF0 /* Inject.swift in Sources */, 535983F22C144E87003EB6ED /* Keys.swift in Sources */, 539996962C27130000671340 /* ConstraintOffsetTarget.swift in Sources */, @@ -1441,6 +1460,7 @@ EC0CF21D254D8F3900888722 /* String+Extensions.swift in Sources */, 539996812C27130000671340 /* LayoutConstraintItem.swift in Sources */, EC702540254E1E7500BE1958 /* WalkthroughViewController.swift in Sources */, + 672C46DA2C48018400497EF0 /* Color+Colors.swift in Sources */, EC0CF215254D8DE900888722 /* DocumentsTableViewController.swift in Sources */, 53CD5F542C15022E0010424B /* KNAlertViewController.swift in Sources */, 53014F9D2C11A8E80071CE39 /* Array+Utils.swift in Sources */, diff --git a/MiniScanner/Extensions/Style/Color+Colors.swift b/MiniScanner/Extensions/Style/Color+Colors.swift new file mode 100644 index 0000000000000000000000000000000000000000..d3e825cc21d9464a49308a9c203ab45deb999524 --- /dev/null +++ b/MiniScanner/Extensions/Style/Color+Colors.swift @@ -0,0 +1,23 @@ +// +// Color+Colors.swift +// MiniScanner +// +// Created by Mustafa Merza on 7/17/24. +// Copyright © 2024 AppsNectar. All rights reserved. +// + +import SwiftUI + +extension Color { + + static let tintColor = Color(.tint) + static let barTintColor = Color(.barTint) + + static let buttonsBlue = Color(.buttonsBlue) + static let cellBackground = Color(.cellBackground) + static let lightButton = Color(.lightButton) + static let mainBlue = Color(.mainBlue) + static let mainText = Color(.mainText) + static let separator = Color(.separator) + static let titlesText = Color(.titlesText) +} diff --git a/MiniScanner/Extensions/Style/UIColors+Colors.swift b/MiniScanner/Extensions/Style/UIColors+Colors.swift new file mode 100644 index 0000000000000000000000000000000000000000..e11bb8f7cd76e3c2f70a478324630fc99c181607 --- /dev/null +++ b/MiniScanner/Extensions/Style/UIColors+Colors.swift @@ -0,0 +1,23 @@ +// +// UIColors+Colors.swift +// MiniScanner +// +// Created by Mustafa Merza on 7/17/24. +// Copyright © 2024 AppsNectar. All rights reserved. +// + +import UIKit + +extension UIColor { + + static let tintColor = UIColor(resource: .tint) + static let barTintColor = UIColor(resource: .barTint) + + static let buttonsBlue = UIColor(resource: .buttonsBlue) + static let cellBackground = UIColor(resource: .cellBackground) + static let lightButton = UIColor(resource: .lightButton) + static let mainBlue = UIColor(resource: .mainBlue) + static let mainText = UIColor(resource: .mainText) + static let separator = UIColor(resource: .separator) + static let titlesText = UIColor(resource: .titlesText) +} diff --git a/MiniScanner/Extensions/UIColor+Extensions.swift b/MiniScanner/Extensions/UIColor+Extensions.swift index 59668df813191fed8d47d47f229480dec056d816..eb0039a4e83216729fa62a6e2dc6f498a84f3de1 100644 --- a/MiniScanner/Extensions/UIColor+Extensions.swift +++ b/MiniScanner/Extensions/UIColor+Extensions.swift @@ -9,15 +9,15 @@ import Foundation import UIKit -extension UIColor { - static let mainBlue = hex("#007EFF") - static let buttonsBlue = hex("#1F86FF") - static let mainText = hex("#505050") - static let titlesText = hex("#888888") - static let cellBackground = hex("#F4F4F4") - static let lightButton = hex("#E9EDF2") - static let separator = hex("#646464") -} +//extension UIColor { +// static let mainBlue = hex("#007EFF") +// static let buttonsBlue = hex("#1F86FF") +// static let mainText = hex("#505050") +// static let titlesText = hex("#888888") +// static let cellBackground = hex("#F4F4F4") +// static let lightButton = hex("#E9EDF2") +// static let separator = hex("#646464") +//} extension UIColor { /** diff --git a/MiniScanner/Managers/ThemeManager.swift b/MiniScanner/Managers/ThemeManager.swift index 05bd3526cfdbeda123a81a6d3772e6f5338b3e48..8335e65fd3939698c40ad8b13076a833a2bc8177 100644 --- a/MiniScanner/Managers/ThemeManager.swift +++ b/MiniScanner/Managers/ThemeManager.swift @@ -28,23 +28,23 @@ final class ThemeManager { } } -extension UIColor { - class var tintColor: UIColor { - if UIScreen.isDarkMode { - return .white - } else { - return UIColor(named: "AccentColor")! - } - } - - class var barTintColor: UIColor { - if UIScreen.isDarkMode { - return .darkText - } else { - return .white - } - } -} +//extension UIColor { +// class var tintColor: UIColor { +// if UIScreen.isDarkMode { +// return .white +// } else { +// return UIColor(named: "AccentColor")! +// } +// } +// +// class var barTintColor: UIColor { +// if UIScreen.isDarkMode { +// return .darkText +// } else { +// return .white +// } +// } +//} extension UIScreen { static var isDarkMode: Bool { diff --git a/MiniScanner/Supporting Files/Colors.xcassets/Bar Tint.colorset/Contents.json b/MiniScanner/Supporting Files/Colors.xcassets/Bar Tint.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..9c0e331e973d997346f7128f7e72e409570a0c1e --- /dev/null +++ b/MiniScanner/Supporting Files/Colors.xcassets/Bar Tint.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" : "0x00", + "green" : "0x00", + "red" : "0x00" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MiniScanner/Supporting Files/Colors.xcassets/Buttons Blue.colorset/Contents.json b/MiniScanner/Supporting Files/Colors.xcassets/Buttons Blue.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..1ee49e185ca53baf49d55c9b7858815487299d5c --- /dev/null +++ b/MiniScanner/Supporting Files/Colors.xcassets/Buttons Blue.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0x86", + "red" : "0x1F" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "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/Supporting Files/Colors.xcassets/Cell Background.colorset/Contents.json b/MiniScanner/Supporting Files/Colors.xcassets/Cell Background.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..685de5a4e47da620914d408b0e4d4d3c87e0bb64 --- /dev/null +++ b/MiniScanner/Supporting Files/Colors.xcassets/Cell Background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF4", + "green" : "0xF4", + "red" : "0xF4" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x06", + "green" : "0x06", + "red" : "0x06" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MiniScanner/Supporting Files/Colors.xcassets/Contents.json b/MiniScanner/Supporting Files/Colors.xcassets/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..73c00596a7fca3f3d4bdd64053b69d86745f9e10 --- /dev/null +++ b/MiniScanner/Supporting Files/Colors.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MiniScanner/Supporting Files/Colors.xcassets/Light Button.colorset/Contents.json b/MiniScanner/Supporting Files/Colors.xcassets/Light Button.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..814694de83a368d86269625df7e232022328ce5a --- /dev/null +++ b/MiniScanner/Supporting Files/Colors.xcassets/Light Button.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF2", + "green" : "0xED", + "red" : "0xE9" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF2", + "green" : "0xED", + "red" : "0xE9" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MiniScanner/Supporting Files/Colors.xcassets/Main Blue.colorset/Contents.json b/MiniScanner/Supporting Files/Colors.xcassets/Main Blue.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..5babd882d85d2f644cff1f0f2c0e7808c0f93104 --- /dev/null +++ b/MiniScanner/Supporting Files/Colors.xcassets/Main Blue.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0x7E", + "red" : "0x00" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0x7E", + "red" : "0x00" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MiniScanner/Supporting Files/Colors.xcassets/Main Text.colorset/Contents.json b/MiniScanner/Supporting Files/Colors.xcassets/Main Text.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..f7b308d4b9cfd34fc493635045263d2acc6006f1 --- /dev/null +++ b/MiniScanner/Supporting Files/Colors.xcassets/Main Text.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x50", + "green" : "0x50", + "red" : "0x50" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x50", + "green" : "0x50", + "red" : "0x50" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MiniScanner/Supporting Files/Colors.xcassets/Separator.colorset/Contents.json b/MiniScanner/Supporting Files/Colors.xcassets/Separator.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..83491adc62167abc1fdea71998ab99e6688dac63 --- /dev/null +++ b/MiniScanner/Supporting Files/Colors.xcassets/Separator.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x64", + "green" : "0x64", + "red" : "0x64" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "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/Supporting Files/Colors.xcassets/Tint.colorset/Contents.json b/MiniScanner/Supporting Files/Colors.xcassets/Tint.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..f9fd806619fd43def77293f245a5dde02c486cb9 --- /dev/null +++ b/MiniScanner/Supporting Files/Colors.xcassets/Tint.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xC6", + "green" : "0x4F", + "red" : "0x00" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xC6", + "green" : "0x4F", + "red" : "0x00" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MiniScanner/Supporting Files/Colors.xcassets/Titles Text.colorset/Contents.json b/MiniScanner/Supporting Files/Colors.xcassets/Titles Text.colorset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..6e67b4237e61004e11d616965aaaf0c8459d347a --- /dev/null +++ b/MiniScanner/Supporting Files/Colors.xcassets/Titles Text.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x88", + "green" : "0x88", + "red" : "0x88" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x88", + "green" : "0x88", + "red" : "0x88" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +}