├── .github
└── FUNDING.yml
├── Gemfile
├── .travis.yml
├── SwiftHEXColors.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
├── SwiftHEXColors_Info.plist
├── SwiftHEXColorsTests_Info.plist
├── xcshareddata
│ └── xcschemes
│ │ ├── SwiftHEXColorsTests.xcscheme
│ │ ├── SwiftHEXColors-Package.xcscheme
│ │ └── SwiftHEXColors.xcscheme
└── project.pbxproj
├── Package.swift
├── SwiftHEXColors.podspec
├── Tests
├── Info.plist
└── SwiftHEXColorsTests
│ └── SwiftHEXColorsTests.swift
├── fastlane
├── README.md
└── Fastfile
├── Sources
├── Info.plist
└── SwiftHEXColors
│ └── SwiftHEXColors.swift
├── LICENSE
├── .gitignore
├── README.md
└── Gemfile.lock
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: [thii]
2 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 |
3 | gem "cocoapods", "~> 1.7.4"
4 | gem "fastlane"
5 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: objective-c
2 | osx_image: xcode10.2
3 | script:
4 | - swift test
5 | - bundle exec fastlane test
6 |
--------------------------------------------------------------------------------
/SwiftHEXColors.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
--------------------------------------------------------------------------------
/SwiftHEXColors.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/SwiftHEXColors.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:5.0
2 |
3 | import PackageDescription
4 |
5 | let package = Package(
6 | name: "SwiftHEXColors",
7 | products: [
8 | .library(
9 | name: "SwiftHEXColors",
10 | targets: ["SwiftHEXColors"]),
11 | ],
12 | targets: [
13 | .target(
14 | name: "SwiftHEXColors",
15 | dependencies: []),
16 | .testTarget(
17 | name: "SwiftHEXColorsTests",
18 | dependencies: ["SwiftHEXColors"]),
19 | ]
20 | )
21 |
--------------------------------------------------------------------------------
/SwiftHEXColors.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = "SwiftHEXColors"
3 | s.version = "1.4.1"
4 | s.summary = "HEX color handling as an extension for UIColor. Written in Swift."
5 | s.homepage = "https://github.com/thii/SwiftHEXColors"
6 | s.license = { :type => 'MIT', :file => 'LICENSE' }
7 | s.author = { "SwiftHEXColors contributors" => "t@thi.im" }
8 | s.source = { :git => "https://github.com/thii/SwiftHEXColors.git", :tag => s.version.to_s }
9 | s.ios.deployment_target = '8.0'
10 | s.watchos.deployment_target = '4.0'
11 | s.osx.deployment_target = '10.9'
12 | s.tvos.deployment_target = '9.0'
13 | s.requires_arc = true
14 | s.source_files = "Sources/**/*.{,swift}"
15 | s.swift_version = "5.0"
16 | end
17 |
--------------------------------------------------------------------------------
/Tests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/SwiftHEXColors.xcodeproj/SwiftHEXColors_Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | CFBundleDevelopmentRegion
5 | en
6 | CFBundleExecutable
7 | $(EXECUTABLE_NAME)
8 | CFBundleIdentifier
9 | $(PRODUCT_BUNDLE_IDENTIFIER)
10 | CFBundleInfoDictionaryVersion
11 | 6.0
12 | CFBundleName
13 | $(PRODUCT_NAME)
14 | CFBundlePackageType
15 | FMWK
16 | CFBundleShortVersionString
17 | 1.0
18 | CFBundleSignature
19 | ????
20 | CFBundleVersion
21 | $(CURRENT_PROJECT_VERSION)
22 | NSPrincipalClass
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/fastlane/README.md:
--------------------------------------------------------------------------------
1 | fastlane documentation
2 | ================
3 | # Installation
4 |
5 | Make sure you have the latest version of the Xcode command line tools installed:
6 |
7 | ```
8 | xcode-select --install
9 | ```
10 |
11 | Install _fastlane_ using
12 | ```
13 | [sudo] gem install fastlane -NV
14 | ```
15 | or alternatively using `brew cask install fastlane`
16 |
17 | # Available Actions
18 | ### test
19 | ```
20 | fastlane test
21 | ```
22 | Run all tests
23 | ### release
24 | ```
25 | fastlane release
26 | ```
27 | Release a new version
28 |
29 | ----
30 |
31 | This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run.
32 | More information about fastlane can be found on [fastlane.tools](https://fastlane.tools).
33 | The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
34 |
--------------------------------------------------------------------------------
/SwiftHEXColors.xcodeproj/SwiftHEXColorsTests_Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | CFBundleDevelopmentRegion
5 | en
6 | CFBundleExecutable
7 | $(EXECUTABLE_NAME)
8 | CFBundleIdentifier
9 | $(PRODUCT_BUNDLE_IDENTIFIER)
10 | CFBundleInfoDictionaryVersion
11 | 6.0
12 | CFBundleName
13 | $(PRODUCT_NAME)
14 | CFBundlePackageType
15 | BNDL
16 | CFBundleShortVersionString
17 | 1.0
18 | CFBundleSignature
19 | ????
20 | CFBundleVersion
21 | $(CURRENT_PROJECT_VERSION)
22 | NSPrincipalClass
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Sources/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.2
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/fastlane/Fastfile:
--------------------------------------------------------------------------------
1 | desc "Run all tests"
2 | lane :test do
3 | scan(
4 | project: "SwiftHEXColors.xcodeproj",
5 | scheme: "SwiftHEXColors",
6 | device: "iPhone 7",
7 | include_simulator_logs: false,
8 | code_coverage: true
9 | )
10 | pod_lib_lint allow_warnings: true
11 | end
12 |
13 | desc "Release a new version"
14 | lane :release do |options|
15 | target_version = options[:version]
16 | raise "The version is missed. Use `bundle exec fastlane release version:{version_number}`.`" if target_version.nil?
17 |
18 | ensure_git_branch
19 | ensure_git_status_clean
20 |
21 | test
22 |
23 | version_bump_podspec(path: "SwiftHEXColors.podspec", version_number: target_version)
24 |
25 | git_commit(path: ".", message: "[bot] Bump version to #{target_version}")
26 | add_git_tag(tag: target_version, message: target_version)
27 | sh("git push origin master")
28 | sh("git push origin #{target_version}")
29 |
30 | pod_push(use_bundle_exec: true)
31 | end
32 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014 SwiftHEXColors contributors
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ### https://raw.github.com/github/gitignore/35c010258fc790ad769033e9ccfb1021178f2925/swift.gitignore
2 |
3 | # Xcode
4 | #
5 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
6 |
7 | ## Build generated
8 | build/
9 | DerivedData/
10 |
11 | ## Various settings
12 | *.pbxuser
13 | !default.pbxuser
14 | *.mode1v3
15 | !default.mode1v3
16 | *.mode2v3
17 | !default.mode2v3
18 | *.perspectivev3
19 | !default.perspectivev3
20 | xcuserdata/
21 |
22 | ## Other
23 | *.moved-aside
24 | *.xccheckout
25 | *.xcscmblueprint
26 |
27 | ## Obj-C/Swift specific
28 | *.hmap
29 | *.ipa
30 | *.dSYM.zip
31 | *.dSYM
32 |
33 | ## Playgrounds
34 | timeline.xctimeline
35 | playground.xcworkspace
36 |
37 | # Swift Package Manager
38 | #
39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
40 | # Packages/
41 | # Package.pins
42 | .build/
43 |
44 | # CocoaPods
45 | #
46 | # We recommend against adding the Pods directory to your .gitignore. However
47 | # you should judge for yourself, the pros and cons are mentioned at:
48 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
49 | #
50 | # Pods/
51 |
52 | # Carthage
53 | #
54 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
55 | # Carthage/Checkouts
56 |
57 | Carthage/Build
58 |
59 | # fastlane
60 | #
61 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
62 | # screenshots whenever they are needed.
63 | # For more information about the recommended setup visit:
64 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
65 |
66 | fastlane/report.xml
67 | fastlane/Preview.html
68 | fastlane/screenshots
69 | fastlane/test_output
70 |
71 |
72 |
--------------------------------------------------------------------------------
/SwiftHEXColors.xcodeproj/xcshareddata/xcschemes/SwiftHEXColorsTests.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
14 |
15 |
17 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
39 |
40 |
41 |
42 |
48 |
49 |
51 |
52 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/SwiftHEXColors.xcodeproj/xcshareddata/xcschemes/SwiftHEXColors-Package.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
55 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
74 |
76 |
77 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | SwiftHEXColors
2 | ===========
3 |
4 | [](https://travis-ci.org/thii/SwiftHEXColors)
5 | [](https://github.com/apple/swift-package-manager)
6 | [](https://img.shields.io/cocoapods/v/SwiftHEXColors.svg)
7 | [](http://cocoadocs.org/docsets/SwiftHEXColors)
8 | [](https://github.com/Carthage/Carthage)
9 | [](http://cocoadocs.org/docsets/SwiftHEXColors)
10 | [](https://raw.githubusercontent.com/thii/SwiftHEXColors/master/LICENSE)
11 |
12 | HEX color handling as an extension for UIColor. Written in Swift.
13 |
14 | ## Examples
15 | ### iOS
16 | ``` swift
17 | // With hash
18 | let color: UIColor = UIColor(hexString: "#ff8942")
19 |
20 | // Without hash, with alpha
21 | let secondColor: UIColor = UIColor(hexString: "ff8942", alpha: 0.5)
22 |
23 | // Short handling
24 | let shortColorWithHex: UIColor = UIColor(hexString: "fff")
25 | ```
26 |
27 | For those who don't want to type the double quotation, you can init a color from a real hex value (an `Int`)
28 |
29 | ```swift
30 | // With hash
31 | let color: UIColor = UIColor(hex: 0xff8942)
32 |
33 | // Without hash, with alpha
34 | let secondColor: UIColor = UIColor(hex: 0xff8942, alpha: 0.5)
35 | ```
36 |
37 | ### OSX
38 | ``` swift
39 | // With hash
40 | let color: NSColor = NSColor(hexString: "#ff8942")
41 |
42 | // Without hash, with alpha
43 | let secondColor: NSColor = NSColor(hexString: "ff8942", alpha: 0.5)
44 |
45 | // Short handling
46 | let shortColorWithHex: NSColor = NSColor(hexString: "fff")
47 |
48 | // From a real hex value (an `Int`)
49 | // With hash
50 | let color: NSColor = NSColor(hex: 0xff8942)
51 |
52 | // Without hash, with alpha
53 | let secondColor: NSColor = NSColor(hex: 0xff8942, alpha: 0.5)
54 | ```
55 |
56 | ## Installation
57 |
58 | ### Swift Package Manager
59 |
60 | Add this as a dependency in your `Package.swift`:
61 |
62 | ```swift
63 | import PackageDescription
64 |
65 | let package = Package(
66 | name: "MyPackage",
67 | dependencies: [
68 | // Other dependencies
69 | .package(url: "https://github.com/thii/SwiftHEXColors.git", from: "1.3.1")
70 | ]
71 | )
72 | ```
73 |
74 | ### CocoaPods
75 |
76 | To integrate SwiftHEXColors into your Xcode project using CocoaPods, specify it in your `Podfile`:
77 |
78 | ```ruby
79 | source 'https://github.com/CocoaPods/Specs.git'
80 | platform :ios, '8.0'
81 | use_frameworks!
82 |
83 | pod 'SwiftHEXColors'
84 | ```
85 |
86 | Then, run the following command:
87 |
88 | ```bash
89 | $ pod install
90 | ```
91 |
92 | And add `import SwiftHEXColors` to the top of the files using SwiftHEXColors.
93 |
94 | ### Carthage
95 |
96 | [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
97 |
98 | You can install Carthage with [Homebrew](http://brew.sh/) using the following command:
99 |
100 | ```bash
101 | $ brew update
102 | $ brew install carthage
103 | ```
104 |
105 | To integrate SwiftHEXColors into your Xcode project using Carthage, specify it in your `Cartfile`:
106 |
107 | ```ogdl
108 | github "thii/SwiftHEXColors"
109 | ```
110 |
111 | Run `carthage update` to build the framework and drag the built `SwiftHEXColors.framework` into your Xcode project.
112 |
113 | ### Manually
114 | - Drag and drop `SwiftHEXColors.swift` file into your project
115 |
116 | # Requirements
117 | - Swift 3
118 | - iOS 8.0 or above.
119 |
120 | # License
121 | [MIT](http://thi.mit-license.org/)
122 |
--------------------------------------------------------------------------------
/SwiftHEXColors.xcodeproj/xcshareddata/xcschemes/SwiftHEXColors.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
64 |
65 |
71 |
72 |
73 |
74 |
75 |
76 |
82 |
83 |
89 |
90 |
91 |
92 |
94 |
95 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | CFPropertyList (3.0.0)
5 | activesupport (4.2.11.1)
6 | i18n (~> 0.7)
7 | minitest (~> 5.1)
8 | thread_safe (~> 0.3, >= 0.3.4)
9 | tzinfo (~> 1.1)
10 | addressable (2.6.0)
11 | public_suffix (>= 2.0.2, < 4.0)
12 | atomos (0.1.3)
13 | babosa (1.0.2)
14 | claide (1.0.2)
15 | cocoapods (1.7.5)
16 | activesupport (>= 4.0.2, < 5)
17 | claide (>= 1.0.2, < 2.0)
18 | cocoapods-core (= 1.7.5)
19 | cocoapods-deintegrate (>= 1.0.3, < 2.0)
20 | cocoapods-downloader (>= 1.2.2, < 2.0)
21 | cocoapods-plugins (>= 1.0.0, < 2.0)
22 | cocoapods-search (>= 1.0.0, < 2.0)
23 | cocoapods-stats (>= 1.0.0, < 2.0)
24 | cocoapods-trunk (>= 1.3.1, < 2.0)
25 | cocoapods-try (>= 1.1.0, < 2.0)
26 | colored2 (~> 3.1)
27 | escape (~> 0.0.4)
28 | fourflusher (>= 2.3.0, < 3.0)
29 | gh_inspector (~> 1.0)
30 | molinillo (~> 0.6.6)
31 | nap (~> 1.0)
32 | ruby-macho (~> 1.4)
33 | xcodeproj (>= 1.10.0, < 2.0)
34 | cocoapods-core (1.7.5)
35 | activesupport (>= 4.0.2, < 6)
36 | fuzzy_match (~> 2.0.4)
37 | nap (~> 1.0)
38 | cocoapods-deintegrate (1.0.4)
39 | cocoapods-downloader (1.2.2)
40 | cocoapods-plugins (1.0.0)
41 | nap
42 | cocoapods-search (1.0.0)
43 | cocoapods-stats (1.1.0)
44 | cocoapods-trunk (1.3.1)
45 | nap (>= 0.8, < 2.0)
46 | netrc (~> 0.11)
47 | cocoapods-try (1.1.0)
48 | colored (1.2)
49 | colored2 (3.1.2)
50 | commander-fastlane (4.4.6)
51 | highline (~> 1.7.2)
52 | concurrent-ruby (1.1.5)
53 | declarative (0.0.10)
54 | declarative-option (0.1.0)
55 | digest-crc (0.4.1)
56 | domain_name (0.5.20190701)
57 | unf (>= 0.0.5, < 1.0.0)
58 | dotenv (2.7.4)
59 | emoji_regex (1.0.1)
60 | escape (0.0.4)
61 | excon (0.71.0)
62 | faraday (0.15.4)
63 | multipart-post (>= 1.2, < 3)
64 | faraday-cookie_jar (0.0.6)
65 | faraday (>= 0.7.4)
66 | http-cookie (~> 1.0.0)
67 | faraday_middleware (0.13.1)
68 | faraday (>= 0.7.4, < 1.0)
69 | fastimage (2.1.5)
70 | fastlane (2.128.1)
71 | CFPropertyList (>= 2.3, < 4.0.0)
72 | addressable (>= 2.3, < 3.0.0)
73 | babosa (>= 1.0.2, < 2.0.0)
74 | bundler (>= 1.12.0, < 3.0.0)
75 | colored
76 | commander-fastlane (>= 4.4.6, < 5.0.0)
77 | dotenv (>= 2.1.1, < 3.0.0)
78 | emoji_regex (>= 0.1, < 2.0)
79 | excon (>= 0.45.0, < 1.0.0)
80 | faraday (~> 0.9)
81 | faraday-cookie_jar (~> 0.0.6)
82 | faraday_middleware (~> 0.9)
83 | fastimage (>= 2.1.0, < 3.0.0)
84 | gh_inspector (>= 1.1.2, < 2.0.0)
85 | google-api-client (>= 0.21.2, < 0.24.0)
86 | google-cloud-storage (>= 1.15.0, < 2.0.0)
87 | highline (>= 1.7.2, < 2.0.0)
88 | json (< 3.0.0)
89 | jwt (~> 2.1.0)
90 | mini_magick (>= 4.9.4, < 5.0.0)
91 | multi_xml (~> 0.5)
92 | multipart-post (~> 2.0.0)
93 | plist (>= 3.1.0, < 4.0.0)
94 | public_suffix (~> 2.0.0)
95 | rubyzip (>= 1.2.2, < 2.0.0)
96 | security (= 0.1.3)
97 | simctl (~> 1.6.3)
98 | slack-notifier (>= 2.0.0, < 3.0.0)
99 | terminal-notifier (>= 2.0.0, < 3.0.0)
100 | terminal-table (>= 1.4.5, < 2.0.0)
101 | tty-screen (>= 0.6.3, < 1.0.0)
102 | tty-spinner (>= 0.8.0, < 1.0.0)
103 | word_wrap (~> 1.0.0)
104 | xcodeproj (>= 1.8.1, < 2.0.0)
105 | xcpretty (~> 0.3.0)
106 | xcpretty-travis-formatter (>= 0.0.3)
107 | fourflusher (2.3.1)
108 | fuzzy_match (2.0.4)
109 | gh_inspector (1.1.3)
110 | google-api-client (0.23.9)
111 | addressable (~> 2.5, >= 2.5.1)
112 | googleauth (>= 0.5, < 0.7.0)
113 | httpclient (>= 2.8.1, < 3.0)
114 | mime-types (~> 3.0)
115 | representable (~> 3.0)
116 | retriable (>= 2.0, < 4.0)
117 | signet (~> 0.9)
118 | google-cloud-core (1.3.0)
119 | google-cloud-env (~> 1.0)
120 | google-cloud-env (1.2.0)
121 | faraday (~> 0.11)
122 | google-cloud-storage (1.16.0)
123 | digest-crc (~> 0.4)
124 | google-api-client (~> 0.23)
125 | google-cloud-core (~> 1.2)
126 | googleauth (>= 0.6.2, < 0.10.0)
127 | googleauth (0.6.7)
128 | faraday (~> 0.12)
129 | jwt (>= 1.4, < 3.0)
130 | memoist (~> 0.16)
131 | multi_json (~> 1.11)
132 | os (>= 0.9, < 2.0)
133 | signet (~> 0.7)
134 | highline (1.7.10)
135 | http-cookie (1.0.3)
136 | domain_name (~> 0.5)
137 | httpclient (2.8.3)
138 | i18n (0.9.5)
139 | concurrent-ruby (~> 1.0)
140 | json (2.3.1)
141 | jwt (2.1.0)
142 | memoist (0.16.0)
143 | mime-types (3.2.2)
144 | mime-types-data (~> 3.2015)
145 | mime-types-data (3.2019.0331)
146 | mini_magick (4.9.5)
147 | minitest (5.11.3)
148 | molinillo (0.6.6)
149 | multi_json (1.13.1)
150 | multi_xml (0.6.0)
151 | multipart-post (2.0.0)
152 | nanaimo (0.2.6)
153 | nap (1.1.0)
154 | naturally (2.2.0)
155 | netrc (0.11.0)
156 | os (1.0.1)
157 | plist (3.5.0)
158 | public_suffix (2.0.5)
159 | representable (3.0.4)
160 | declarative (< 0.1.0)
161 | declarative-option (< 0.2.0)
162 | uber (< 0.2.0)
163 | retriable (3.1.2)
164 | rouge (2.0.7)
165 | ruby-macho (1.4.0)
166 | rubyzip (1.3.0)
167 | security (0.1.3)
168 | signet (0.11.0)
169 | addressable (~> 2.3)
170 | faraday (~> 0.9)
171 | jwt (>= 1.5, < 3.0)
172 | multi_json (~> 1.10)
173 | simctl (1.6.5)
174 | CFPropertyList
175 | naturally
176 | slack-notifier (2.3.2)
177 | terminal-notifier (2.0.0)
178 | terminal-table (1.8.0)
179 | unicode-display_width (~> 1.1, >= 1.1.1)
180 | thread_safe (0.3.6)
181 | tty-cursor (0.7.0)
182 | tty-screen (0.7.0)
183 | tty-spinner (0.9.1)
184 | tty-cursor (~> 0.7)
185 | tzinfo (1.2.5)
186 | thread_safe (~> 0.1)
187 | uber (0.1.0)
188 | unf (0.1.4)
189 | unf_ext
190 | unf_ext (0.0.7.6)
191 | unicode-display_width (1.6.0)
192 | word_wrap (1.0.0)
193 | xcodeproj (1.11.0)
194 | CFPropertyList (>= 2.3.3, < 4.0)
195 | atomos (~> 0.1.3)
196 | claide (>= 1.0.2, < 2.0)
197 | colored2 (~> 3.1)
198 | nanaimo (~> 0.2.6)
199 | xcpretty (0.3.0)
200 | rouge (~> 2.0.7)
201 | xcpretty-travis-formatter (1.0.0)
202 | xcpretty (~> 0.2, >= 0.0.7)
203 |
204 | PLATFORMS
205 | ruby
206 |
207 | DEPENDENCIES
208 | cocoapods (~> 1.7.4)
209 | fastlane
210 |
211 | BUNDLED WITH
212 | 2.0.2
213 |
--------------------------------------------------------------------------------
/Sources/SwiftHEXColors/SwiftHEXColors.swift:
--------------------------------------------------------------------------------
1 | // SwiftHEXColors.swift
2 | //
3 | // Copyright (c) 2014 SwiftHEXColors contributors
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in
13 | // all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | // THE SOFTWARE.
22 |
23 | #if os(iOS) || os(tvOS) || os(watchOS)
24 | import UIKit
25 | typealias SWColor = UIColor
26 | #else
27 | import Cocoa
28 | typealias SWColor = NSColor
29 | #endif
30 |
31 | private extension Int64 {
32 | func duplicate4bits() -> Int64 {
33 | return (self << 4) + self
34 | }
35 | }
36 |
37 | /// An extension of UIColor (on iOS) or NSColor (on OSX) providing HEX color handling.
38 | public extension SWColor {
39 | private convenience init?(hex3: Int64, alpha: Float) {
40 | self.init(red: CGFloat( ((hex3 & 0xF00) >> 8).duplicate4bits() ) / 255.0,
41 | green: CGFloat( ((hex3 & 0x0F0) >> 4).duplicate4bits() ) / 255.0,
42 | blue: CGFloat( ((hex3 & 0x00F) >> 0).duplicate4bits() ) / 255.0,
43 | alpha: CGFloat(alpha))
44 | }
45 |
46 | private convenience init?(hex4: Int64, alpha: Float?) {
47 | self.init(red: CGFloat( ((hex4 & 0xF000) >> 12).duplicate4bits() ) / 255.0,
48 | green: CGFloat( ((hex4 & 0x0F00) >> 8).duplicate4bits() ) / 255.0,
49 | blue: CGFloat( ((hex4 & 0x00F0) >> 4).duplicate4bits() ) / 255.0,
50 | alpha: alpha.map(CGFloat.init(_:)) ?? CGFloat( ((hex4 & 0x000F) >> 0).duplicate4bits() ) / 255.0)
51 | }
52 |
53 | private convenience init?(hex6: Int64, alpha: Float) {
54 | self.init(red: CGFloat( (hex6 & 0xFF0000) >> 16 ) / 255.0,
55 | green: CGFloat( (hex6 & 0x00FF00) >> 8 ) / 255.0,
56 | blue: CGFloat( (hex6 & 0x0000FF) >> 0 ) / 255.0, alpha: CGFloat(alpha))
57 | }
58 |
59 | private convenience init?(hex8: Int64, alpha: Float?) {
60 | self.init(red: CGFloat( (hex8 & 0xFF000000) >> 24 ) / 255.0,
61 | green: CGFloat( (hex8 & 0x00FF0000) >> 16 ) / 255.0,
62 | blue: CGFloat( (hex8 & 0x0000FF00) >> 8 ) / 255.0,
63 | alpha: alpha.map(CGFloat.init(_:)) ?? CGFloat( (hex8 & 0x000000FF) >> 0 ) / 255.0)
64 | }
65 |
66 | /**
67 | Create non-autoreleased color with in the given hex string and alpha.
68 |
69 | - parameter hexString: The hex string, with or without the hash character.
70 | - parameter alpha: The alpha value, a floating value between 0 and 1.
71 | - returns: A color with the given hex string and alpha.
72 | */
73 | convenience init?(hexString: String, alpha: Float? = nil) {
74 | var hex = hexString
75 |
76 | // Check for hash and remove the hash
77 | if hex.hasPrefix("#") {
78 | hex = String(hex[hex.index(after: hex.startIndex)...])
79 | }
80 |
81 | guard let hexVal = Int64(hex, radix: 16) else {
82 | self.init()
83 | return nil
84 | }
85 |
86 | switch hex.count {
87 | case 3:
88 | self.init(hex3: hexVal, alpha: alpha ?? 1.0)
89 | case 4:
90 | self.init(hex4: hexVal, alpha: alpha)
91 | case 6:
92 | self.init(hex6: hexVal, alpha: alpha ?? 1.0)
93 | case 8:
94 | self.init(hex8: hexVal, alpha: alpha)
95 | default:
96 | // Note:
97 | // The swift 1.1 compiler is currently unable to destroy partially initialized classes in all cases,
98 | // so it disallows formation of a situation where it would have to. We consider this a bug to be fixed
99 | // in future releases, not a feature. -- Apple Forum
100 | self.init()
101 | return nil
102 | }
103 | }
104 |
105 | /**
106 | Create non-autoreleased color with in the given hex value and alpha
107 |
108 | - parameter hex: The hex value. For example: 0xff8942 (no quotation).
109 | - parameter alpha: The alpha value, a floating value between 0 and 1.
110 | - returns: color with the given hex value and alpha
111 | */
112 | convenience init?(hex: Int, alpha: Float = 1.0) {
113 | if (0x000000 ... 0xFFFFFF) ~= hex {
114 | self.init(hex6: Int64(hex), alpha: alpha)
115 | } else {
116 | self.init()
117 | return nil
118 | }
119 | }
120 |
121 | convenience init?(argbHex: Int) {
122 | if (0x00000000 ... 0xFFFFFFFF) ~= argbHex {
123 | let hex = Int64(argbHex)
124 | self.init(red: CGFloat( (hex & 0x00FF0000) >> 16 ) / 255.0,
125 | green: CGFloat( (hex & 0x0000FF00) >> 8 ) / 255.0,
126 | blue: CGFloat( (hex & 0x000000FF) >> 0 ) / 255.0,
127 | alpha: CGFloat( (hex & 0xFF000000) >> 24 ) / 255.0)
128 | } else {
129 | self.init()
130 | return nil
131 | }
132 | }
133 |
134 | convenience init?(argbHexString: String) {
135 | var hex = argbHexString
136 |
137 | // Check for hash and remove the hash
138 | if hex.hasPrefix("#") {
139 | hex = String(hex[hex.index(after: hex.startIndex)...])
140 | }
141 |
142 | guard hex.count == 8, let hexVal = Int64(hex, radix: 16) else {
143 | self.init()
144 | return nil
145 | }
146 | self.init(red: CGFloat( (hexVal & 0x00FF0000) >> 16 ) / 255.0,
147 | green: CGFloat( (hexVal & 0x0000FF00) >> 8 ) / 255.0,
148 | blue: CGFloat( (hexVal & 0x000000FF) >> 0 ) / 255.0,
149 | alpha: CGFloat( (hexVal & 0xFF000000) >> 24 ) / 255.0)
150 | }
151 |
152 | }
153 |
--------------------------------------------------------------------------------
/Tests/SwiftHEXColorsTests/SwiftHEXColorsTests.swift:
--------------------------------------------------------------------------------
1 | // SwiftHEXColorsTests
2 | //
3 | // Copyright (c) 2014-2016 SwiftHEXColors contributors
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in
13 | // all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | // THE SOFTWARE.
22 |
23 | import XCTest
24 | @testable import SwiftHEXColors
25 |
26 | private let epsilon: CGFloat = 0.001
27 | private func ~=(c1: SWColor, c2: SWColor) -> Bool {
28 | var a1: CGFloat = 0.0
29 | var r1: CGFloat = 0.0
30 | var g1: CGFloat = 0.0
31 | var b1: CGFloat = 0.0
32 |
33 | c1.getRed(&r1, green: &g1, blue: &b1, alpha: &a1)
34 |
35 | var a2: CGFloat = 0.0
36 | var r2: CGFloat = 0.0
37 | var g2: CGFloat = 0.0
38 | var b2: CGFloat = 0.0
39 |
40 | c2.getRed(&r2, green: &g2, blue: &b2, alpha: &a2)
41 |
42 | for (c1, c2) in [(r1, r2), (g1, g2), (b1, b2), (a1, a2)] {
43 | if abs(c1 - c2) >= epsilon {
44 | return false
45 | }
46 | }
47 | return true
48 | }
49 |
50 | class SwiftHEXColorsTests: XCTestCase {
51 |
52 | func testThat12bitColorIsInited() {
53 | let color = SWColor(hexString: "#D4A", alpha: 0.88)
54 | let expected = SWColor(red: 221.0 / 255.0, green: 68.0 / 255.0, blue: 170.0 / 255.0, alpha: 0.88)
55 | XCTAssertTrue(color! ~= expected)
56 | }
57 |
58 | func testThat24bitColorIsInited() {
59 | let color = SWColor(hexString: "#81DAB9", alpha: 0.88)
60 | let expected = SWColor(red: 129.0 / 255.0, green: 218.0 / 255.0, blue: 185.0 / 255.0, alpha: 0.88)
61 | XCTAssertTrue(color! ~= expected)
62 | }
63 |
64 | func testThat16bitColorIsInited() {
65 | let color = SWColor(hexString: "#78A2")
66 | let expected = SWColor(red: 119 / 255.0, green: 136 / 255.0, blue: 170 / 255.0, alpha: 34 / 255.0)
67 | XCTAssertTrue(color! ~= expected)
68 | }
69 |
70 | func testThat32bitColorIsInited() {
71 | let color = SWColor(hexString: "#81DAB9CC")
72 | let expected = SWColor(red: 129.0 / 255.0, green: 218.0 / 255.0, blue: 185.0 / 255.0, alpha: 204 / 255.0)
73 | XCTAssertTrue(color! ~= expected)
74 | }
75 |
76 | func testThatProvidedAlphaOverrides16bitColorAlpha() {
77 | let color = SWColor(hexString: "#78A2", alpha: 0.9)
78 | let expected = SWColor(red: 119 / 255.0, green: 136 / 255.0, blue: 170 / 255.0, alpha: 0.9)
79 | XCTAssertTrue(color! ~= expected)
80 | }
81 |
82 | func testThatProvidedAlphaOverrides32bitColorAlpha() {
83 | let color = SWColor(hexString: "#81DAB9CC", alpha: 0.2)
84 | let expected = SWColor(red: 129.0 / 255.0, green: 218.0 / 255.0, blue: 185.0 / 255.0, alpha: 0.2)
85 | XCTAssertTrue(color! ~= expected)
86 | }
87 |
88 | func testThatNotHexSymbolProducesNil() {
89 | let color = SWColor(hexString: "#FFF&FF", alpha: 0.88)
90 | XCTAssertNil(color)
91 | }
92 |
93 | func testThatTooBigIntColorIsNil() {
94 | let color = SWColor(hex: 0xFFFFFFD, alpha: 0.2)
95 | XCTAssertNil(color)
96 | }
97 |
98 | func testThatHexIntColorIsInited() {
99 | let color = SWColor(hex: 0x94D88A, alpha: 0.3)
100 | let expected = SWColor(red: 148.0 / 255.0, green: 216.0 / 255.0, blue: 138.0 / 255.0, alpha: 0.3)
101 | XCTAssertTrue(color! ~= expected)
102 | }
103 |
104 | func testArgbHexString() {
105 | let color = SWColor(argbHexString: "CC81DAB9")
106 | let expected = SWColor(red: 129.0 / 255.0, green: 218.0 / 255.0, blue: 185.0 / 255.0, alpha: 204 / 255.0)
107 | XCTAssertTrue(color! ~= expected)
108 | }
109 |
110 | func testArgbHex() {
111 | let color = SWColor(argbHex: 0xCC81DAB9)
112 | let expected = SWColor(red: 129.0 / 255.0, green: 218.0 / 255.0, blue: 185.0 / 255.0, alpha: 204 / 255.0)
113 | XCTAssertTrue(color! ~= expected)
114 | }
115 |
116 | #if os(macOS)
117 | // is alpha equals to 1 by default after init
118 | func testAlphaInHexStringInit() {
119 | let hexBlackColor = SWColor(hexString: "000000")?.usingColorSpaceName(.calibratedWhite)
120 | XCTAssertNotNil(hexBlackColor)
121 | var white: CGFloat = 0.0
122 | var alpha: CGFloat = 0.0
123 | hexBlackColor!.getWhite(&white, alpha: &alpha)
124 | let expectedAlpha: CGFloat = 1.0
125 | XCTAssertEqual(alpha, expectedAlpha)
126 | }
127 |
128 | func testAlphaInHexStringAlphaInit() {
129 | let hexBlackColor = SWColor(hexString: "000000", alpha: 0.5)?.usingColorSpaceName(.calibratedWhite)
130 | XCTAssertNotNil(hexBlackColor)
131 | var white: CGFloat = 0.0
132 | var alpha: CGFloat = 0.0
133 | hexBlackColor!.getWhite(&white, alpha: &alpha)
134 | let expectedAlpha: CGFloat = 0.5
135 | XCTAssertEqual(alpha, expectedAlpha)
136 | }
137 | #endif
138 |
139 | func testBlackColor() {
140 | let hexBlackColor = SWColor(hexString: "000000")
141 | XCTAssertNotNil(hexBlackColor)
142 | let blackColor = SWColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0)
143 | XCTAssertEqual(hexBlackColor!, blackColor, "Black color mismatch")
144 | }
145 |
146 | // test how Apple might create the black color
147 | func testBlackColorAppleWay() {
148 | let blackColor1 = SWColor.black
149 | let blackColor2 = SWColor(white: 0.0, alpha: 1.0)
150 | XCTAssertEqual(blackColor1, blackColor2)
151 | }
152 |
153 | // does # result in correct color
154 | func testHashColorString() {
155 | let hexWhiteColor = SWColor(hexString: "#FFFFFF")
156 | XCTAssertNotNil(hexWhiteColor)
157 | let whiteColor = SWColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
158 | XCTAssertEqual(hexWhiteColor!, whiteColor)
159 | }
160 |
161 |
162 | func testInitWithIntValue() {
163 | let hex = 0x009C17
164 | XCTAssertNotNil(SWColor(hex: hex))
165 | XCTAssertEqual(SWColor(hex: hex), SWColor(hexString: "009C17"))
166 | }
167 |
168 | // does string w/ # and w/o # results in same color
169 | func testWithAndWithoutHash() {
170 | let colorWithHash = SWColor(hexString: "#490d87")
171 | XCTAssertNotNil(colorWithHash)
172 | let colorWithoutHash = SWColor(hexString: "490d87")
173 | XCTAssertNotNil(colorWithoutHash)
174 | XCTAssertEqual(colorWithHash!, colorWithoutHash!)
175 | }
176 |
177 | func testIncorrectFormatString() {
178 | let wrongColor01 = SWColor(hexString: "#incorrect")
179 | XCTAssertNil(wrongColor01)
180 | let wrongColor02 = SWColor(hexString: "GGGGGG")
181 | XCTAssertNil(wrongColor02)
182 | let wrongColor03 = SWColor(hexString: "-FFFFFF")
183 | XCTAssertNil(wrongColor03)
184 | let wrongColor04 = SWColor(hexString: "#FFFFF")
185 | XCTAssertNil(wrongColor04)
186 | let wrongColor05 = SWColor(hexString: "#GGG")
187 | XCTAssertNil(wrongColor05)
188 | let wrongColor06 = SWColor(hexString: "HHH")
189 | XCTAssertNil(wrongColor06)
190 | }
191 | }
192 |
--------------------------------------------------------------------------------
/SwiftHEXColors.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = "1";
4 | objectVersion = "46";
5 | objects = {
6 | "OBJ_1" = {
7 | isa = "PBXProject";
8 | attributes = {
9 | LastSwiftMigration = "9999";
10 | LastUpgradeCheck = "9999";
11 | };
12 | buildConfigurationList = "OBJ_2";
13 | compatibilityVersion = "Xcode 3.2";
14 | developmentRegion = "English";
15 | hasScannedForEncodings = "0";
16 | knownRegions = (
17 | "en"
18 | );
19 | mainGroup = "OBJ_5";
20 | productRefGroup = "OBJ_13";
21 | projectDirPath = ".";
22 | targets = (
23 | "SwiftHEXColors::SwiftHEXColors",
24 | "SwiftHEXColors::SwiftPMPackageDescription",
25 | "SwiftHEXColors::SwiftHEXColorsPackageTests::ProductTarget",
26 | "SwiftHEXColors::SwiftHEXColorsTests"
27 | );
28 | };
29 | "OBJ_10" = {
30 | isa = "PBXGroup";
31 | children = (
32 | "OBJ_11"
33 | );
34 | name = "Tests";
35 | path = "";
36 | sourceTree = "SOURCE_ROOT";
37 | };
38 | "OBJ_11" = {
39 | isa = "PBXGroup";
40 | children = (
41 | "OBJ_12"
42 | );
43 | name = "SwiftHEXColorsTests";
44 | path = "Tests/SwiftHEXColorsTests";
45 | sourceTree = "SOURCE_ROOT";
46 | };
47 | "OBJ_12" = {
48 | isa = "PBXFileReference";
49 | path = "SwiftHEXColorsTests.swift";
50 | sourceTree = "";
51 | };
52 | "OBJ_13" = {
53 | isa = "PBXGroup";
54 | children = (
55 | "SwiftHEXColors::SwiftHEXColors::Product",
56 | "SwiftHEXColors::SwiftHEXColorsTests::Product"
57 | );
58 | name = "Products";
59 | path = "";
60 | sourceTree = "BUILT_PRODUCTS_DIR";
61 | };
62 | "OBJ_16" = {
63 | isa = "PBXFileReference";
64 | path = "SwiftHEXColorsExamples";
65 | sourceTree = "SOURCE_ROOT";
66 | };
67 | "OBJ_17" = {
68 | isa = "PBXFileReference";
69 | path = "test_output";
70 | sourceTree = "SOURCE_ROOT";
71 | };
72 | "OBJ_18" = {
73 | isa = "PBXFileReference";
74 | path = "fastlane";
75 | sourceTree = "SOURCE_ROOT";
76 | };
77 | "OBJ_19" = {
78 | isa = "PBXFileReference";
79 | path = "SwiftHEXColors.podspec";
80 | sourceTree = "";
81 | };
82 | "OBJ_2" = {
83 | isa = "XCConfigurationList";
84 | buildConfigurations = (
85 | "OBJ_3",
86 | "OBJ_4"
87 | );
88 | defaultConfigurationIsVisible = "0";
89 | defaultConfigurationName = "Release";
90 | };
91 | "OBJ_20" = {
92 | isa = "PBXFileReference";
93 | path = "LICENSE";
94 | sourceTree = "";
95 | };
96 | "OBJ_21" = {
97 | isa = "PBXFileReference";
98 | path = "README.md";
99 | sourceTree = "";
100 | };
101 | "OBJ_22" = {
102 | isa = "PBXFileReference";
103 | path = "Gemfile";
104 | sourceTree = "";
105 | };
106 | "OBJ_23" = {
107 | isa = "PBXFileReference";
108 | path = "Gemfile.lock";
109 | sourceTree = "";
110 | };
111 | "OBJ_25" = {
112 | isa = "XCConfigurationList";
113 | buildConfigurations = (
114 | "OBJ_26",
115 | "OBJ_27"
116 | );
117 | defaultConfigurationIsVisible = "0";
118 | defaultConfigurationName = "Release";
119 | };
120 | "OBJ_26" = {
121 | isa = "XCBuildConfiguration";
122 | buildSettings = {
123 | CURRENT_PROJECT_VERSION = 1;
124 | ENABLE_TESTABILITY = "YES";
125 | FRAMEWORK_SEARCH_PATHS = (
126 | "$(inherited)",
127 | "$(PLATFORM_DIR)/Developer/Library/Frameworks"
128 | );
129 | HEADER_SEARCH_PATHS = (
130 | "$(inherited)"
131 | );
132 | INFOPLIST_FILE = "SwiftHEXColors.xcodeproj/SwiftHEXColors_Info.plist";
133 | IPHONEOS_DEPLOYMENT_TARGET = "8.0";
134 | LD_RUNPATH_SEARCH_PATHS = (
135 | "$(inherited)",
136 | "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"
137 | );
138 | MACOSX_DEPLOYMENT_TARGET = "10.10";
139 | OTHER_CFLAGS = (
140 | "$(inherited)"
141 | );
142 | OTHER_LDFLAGS = (
143 | "$(inherited)"
144 | );
145 | OTHER_SWIFT_FLAGS = (
146 | "$(inherited)"
147 | );
148 | PRODUCT_BUNDLE_IDENTIFIER = "SwiftHEXColors";
149 | PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
150 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
151 | SKIP_INSTALL = "YES";
152 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = (
153 | "$(inherited)"
154 | );
155 | SWIFT_VERSION = "5.0";
156 | TARGET_NAME = "SwiftHEXColors";
157 | TVOS_DEPLOYMENT_TARGET = "9.0";
158 | WATCHOS_DEPLOYMENT_TARGET = "2.0";
159 | };
160 | name = "Debug";
161 | };
162 | "OBJ_27" = {
163 | isa = "XCBuildConfiguration";
164 | buildSettings = {
165 | CURRENT_PROJECT_VERSION = 1;
166 | ENABLE_TESTABILITY = "YES";
167 | FRAMEWORK_SEARCH_PATHS = (
168 | "$(inherited)",
169 | "$(PLATFORM_DIR)/Developer/Library/Frameworks"
170 | );
171 | HEADER_SEARCH_PATHS = (
172 | "$(inherited)"
173 | );
174 | INFOPLIST_FILE = "SwiftHEXColors.xcodeproj/SwiftHEXColors_Info.plist";
175 | IPHONEOS_DEPLOYMENT_TARGET = "8.0";
176 | LD_RUNPATH_SEARCH_PATHS = (
177 | "$(inherited)",
178 | "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx"
179 | );
180 | MACOSX_DEPLOYMENT_TARGET = "10.10";
181 | OTHER_CFLAGS = (
182 | "$(inherited)"
183 | );
184 | OTHER_LDFLAGS = (
185 | "$(inherited)"
186 | );
187 | OTHER_SWIFT_FLAGS = (
188 | "$(inherited)"
189 | );
190 | PRODUCT_BUNDLE_IDENTIFIER = "SwiftHEXColors";
191 | PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
192 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
193 | SKIP_INSTALL = "YES";
194 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = (
195 | "$(inherited)"
196 | );
197 | SWIFT_VERSION = "5.0";
198 | TARGET_NAME = "SwiftHEXColors";
199 | TVOS_DEPLOYMENT_TARGET = "9.0";
200 | WATCHOS_DEPLOYMENT_TARGET = "2.0";
201 | };
202 | name = "Release";
203 | };
204 | "OBJ_28" = {
205 | isa = "PBXSourcesBuildPhase";
206 | files = (
207 | "OBJ_29"
208 | );
209 | };
210 | "OBJ_29" = {
211 | isa = "PBXBuildFile";
212 | fileRef = "OBJ_9";
213 | };
214 | "OBJ_3" = {
215 | isa = "XCBuildConfiguration";
216 | buildSettings = {
217 | CLANG_ENABLE_OBJC_ARC = "YES";
218 | COMBINE_HIDPI_IMAGES = "YES";
219 | COPY_PHASE_STRIP = "NO";
220 | DEBUG_INFORMATION_FORMAT = "dwarf";
221 | DYLIB_INSTALL_NAME_BASE = "@rpath";
222 | ENABLE_NS_ASSERTIONS = "YES";
223 | GCC_OPTIMIZATION_LEVEL = "0";
224 | GCC_PREPROCESSOR_DEFINITIONS = (
225 | "$(inherited)",
226 | "SWIFT_PACKAGE=1",
227 | "DEBUG=1"
228 | );
229 | MACOSX_DEPLOYMENT_TARGET = "10.10";
230 | ONLY_ACTIVE_ARCH = "YES";
231 | OTHER_SWIFT_FLAGS = (
232 | "-DXcode"
233 | );
234 | PRODUCT_NAME = "$(TARGET_NAME)";
235 | SDKROOT = "macosx";
236 | SUPPORTED_PLATFORMS = (
237 | "macosx",
238 | "iphoneos",
239 | "iphonesimulator",
240 | "appletvos",
241 | "appletvsimulator",
242 | "watchos",
243 | "watchsimulator"
244 | );
245 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = (
246 | "$(inherited)",
247 | "SWIFT_PACKAGE",
248 | "DEBUG"
249 | );
250 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
251 | USE_HEADERMAP = "NO";
252 | };
253 | name = "Debug";
254 | };
255 | "OBJ_30" = {
256 | isa = "PBXFrameworksBuildPhase";
257 | files = (
258 | );
259 | };
260 | "OBJ_32" = {
261 | isa = "XCConfigurationList";
262 | buildConfigurations = (
263 | "OBJ_33",
264 | "OBJ_34"
265 | );
266 | defaultConfigurationIsVisible = "0";
267 | defaultConfigurationName = "Release";
268 | };
269 | "OBJ_33" = {
270 | isa = "XCBuildConfiguration";
271 | buildSettings = {
272 | LD = "/usr/bin/true";
273 | OTHER_SWIFT_FLAGS = (
274 | "-swift-version",
275 | "5",
276 | "-I",
277 | "$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2",
278 | "-target",
279 | "x86_64-apple-macosx10.10",
280 | "-sdk",
281 | "/Applications/Xcode-10.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"
282 | );
283 | SWIFT_VERSION = "5.0";
284 | };
285 | name = "Debug";
286 | };
287 | "OBJ_34" = {
288 | isa = "XCBuildConfiguration";
289 | buildSettings = {
290 | LD = "/usr/bin/true";
291 | OTHER_SWIFT_FLAGS = (
292 | "-swift-version",
293 | "5",
294 | "-I",
295 | "$(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2",
296 | "-target",
297 | "x86_64-apple-macosx10.10",
298 | "-sdk",
299 | "/Applications/Xcode-10.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"
300 | );
301 | SWIFT_VERSION = "5.0";
302 | };
303 | name = "Release";
304 | };
305 | "OBJ_35" = {
306 | isa = "PBXSourcesBuildPhase";
307 | files = (
308 | "OBJ_36"
309 | );
310 | };
311 | "OBJ_36" = {
312 | isa = "PBXBuildFile";
313 | fileRef = "OBJ_6";
314 | };
315 | "OBJ_38" = {
316 | isa = "XCConfigurationList";
317 | buildConfigurations = (
318 | "OBJ_39",
319 | "OBJ_40"
320 | );
321 | defaultConfigurationIsVisible = "0";
322 | defaultConfigurationName = "Release";
323 | };
324 | "OBJ_39" = {
325 | isa = "XCBuildConfiguration";
326 | buildSettings = {
327 | };
328 | name = "Debug";
329 | };
330 | "OBJ_4" = {
331 | isa = "XCBuildConfiguration";
332 | buildSettings = {
333 | CLANG_ENABLE_OBJC_ARC = "YES";
334 | COMBINE_HIDPI_IMAGES = "YES";
335 | COPY_PHASE_STRIP = "YES";
336 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
337 | DYLIB_INSTALL_NAME_BASE = "@rpath";
338 | GCC_OPTIMIZATION_LEVEL = "s";
339 | GCC_PREPROCESSOR_DEFINITIONS = (
340 | "$(inherited)",
341 | "SWIFT_PACKAGE=1"
342 | );
343 | MACOSX_DEPLOYMENT_TARGET = "10.10";
344 | OTHER_SWIFT_FLAGS = (
345 | "-DXcode"
346 | );
347 | PRODUCT_NAME = "$(TARGET_NAME)";
348 | SDKROOT = "macosx";
349 | SUPPORTED_PLATFORMS = (
350 | "macosx",
351 | "iphoneos",
352 | "iphonesimulator",
353 | "appletvos",
354 | "appletvsimulator",
355 | "watchos",
356 | "watchsimulator"
357 | );
358 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = (
359 | "$(inherited)",
360 | "SWIFT_PACKAGE"
361 | );
362 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
363 | USE_HEADERMAP = "NO";
364 | };
365 | name = "Release";
366 | };
367 | "OBJ_40" = {
368 | isa = "XCBuildConfiguration";
369 | buildSettings = {
370 | };
371 | name = "Release";
372 | };
373 | "OBJ_41" = {
374 | isa = "PBXTargetDependency";
375 | target = "SwiftHEXColors::SwiftHEXColorsTests";
376 | };
377 | "OBJ_43" = {
378 | isa = "XCConfigurationList";
379 | buildConfigurations = (
380 | "OBJ_44",
381 | "OBJ_45"
382 | );
383 | defaultConfigurationIsVisible = "0";
384 | defaultConfigurationName = "Release";
385 | };
386 | "OBJ_44" = {
387 | isa = "XCBuildConfiguration";
388 | buildSettings = {
389 | CLANG_ENABLE_MODULES = "YES";
390 | EMBEDDED_CONTENT_CONTAINS_SWIFT = "YES";
391 | FRAMEWORK_SEARCH_PATHS = (
392 | "$(inherited)",
393 | "$(PLATFORM_DIR)/Developer/Library/Frameworks"
394 | );
395 | HEADER_SEARCH_PATHS = (
396 | "$(inherited)"
397 | );
398 | INFOPLIST_FILE = "SwiftHEXColors.xcodeproj/SwiftHEXColorsTests_Info.plist";
399 | IPHONEOS_DEPLOYMENT_TARGET = "8.0";
400 | LD_RUNPATH_SEARCH_PATHS = (
401 | "$(inherited)",
402 | "@loader_path/../Frameworks",
403 | "@loader_path/Frameworks"
404 | );
405 | MACOSX_DEPLOYMENT_TARGET = "10.10";
406 | OTHER_CFLAGS = (
407 | "$(inherited)"
408 | );
409 | OTHER_LDFLAGS = (
410 | "$(inherited)"
411 | );
412 | OTHER_SWIFT_FLAGS = (
413 | "$(inherited)"
414 | );
415 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = (
416 | "$(inherited)"
417 | );
418 | SWIFT_VERSION = "5.0";
419 | TARGET_NAME = "SwiftHEXColorsTests";
420 | TVOS_DEPLOYMENT_TARGET = "9.0";
421 | WATCHOS_DEPLOYMENT_TARGET = "2.0";
422 | };
423 | name = "Debug";
424 | };
425 | "OBJ_45" = {
426 | isa = "XCBuildConfiguration";
427 | buildSettings = {
428 | CLANG_ENABLE_MODULES = "YES";
429 | EMBEDDED_CONTENT_CONTAINS_SWIFT = "YES";
430 | FRAMEWORK_SEARCH_PATHS = (
431 | "$(inherited)",
432 | "$(PLATFORM_DIR)/Developer/Library/Frameworks"
433 | );
434 | HEADER_SEARCH_PATHS = (
435 | "$(inherited)"
436 | );
437 | INFOPLIST_FILE = "SwiftHEXColors.xcodeproj/SwiftHEXColorsTests_Info.plist";
438 | IPHONEOS_DEPLOYMENT_TARGET = "8.0";
439 | LD_RUNPATH_SEARCH_PATHS = (
440 | "$(inherited)",
441 | "@loader_path/../Frameworks",
442 | "@loader_path/Frameworks"
443 | );
444 | MACOSX_DEPLOYMENT_TARGET = "10.10";
445 | OTHER_CFLAGS = (
446 | "$(inherited)"
447 | );
448 | OTHER_LDFLAGS = (
449 | "$(inherited)"
450 | );
451 | OTHER_SWIFT_FLAGS = (
452 | "$(inherited)"
453 | );
454 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = (
455 | "$(inherited)"
456 | );
457 | SWIFT_VERSION = "5.0";
458 | TARGET_NAME = "SwiftHEXColorsTests";
459 | TVOS_DEPLOYMENT_TARGET = "9.0";
460 | WATCHOS_DEPLOYMENT_TARGET = "2.0";
461 | };
462 | name = "Release";
463 | };
464 | "OBJ_46" = {
465 | isa = "PBXSourcesBuildPhase";
466 | files = (
467 | "OBJ_47"
468 | );
469 | };
470 | "OBJ_47" = {
471 | isa = "PBXBuildFile";
472 | fileRef = "OBJ_12";
473 | };
474 | "OBJ_48" = {
475 | isa = "PBXFrameworksBuildPhase";
476 | files = (
477 | "OBJ_49"
478 | );
479 | };
480 | "OBJ_49" = {
481 | isa = "PBXBuildFile";
482 | fileRef = "SwiftHEXColors::SwiftHEXColors::Product";
483 | };
484 | "OBJ_5" = {
485 | isa = "PBXGroup";
486 | children = (
487 | "OBJ_6",
488 | "OBJ_7",
489 | "OBJ_10",
490 | "OBJ_13",
491 | "OBJ_16",
492 | "OBJ_17",
493 | "OBJ_18",
494 | "OBJ_19",
495 | "OBJ_20",
496 | "OBJ_21",
497 | "OBJ_22",
498 | "OBJ_23"
499 | );
500 | path = "";
501 | sourceTree = "";
502 | };
503 | "OBJ_50" = {
504 | isa = "PBXTargetDependency";
505 | target = "SwiftHEXColors::SwiftHEXColors";
506 | };
507 | "OBJ_6" = {
508 | isa = "PBXFileReference";
509 | explicitFileType = "sourcecode.swift";
510 | path = "Package.swift";
511 | sourceTree = "";
512 | };
513 | "OBJ_7" = {
514 | isa = "PBXGroup";
515 | children = (
516 | "OBJ_8"
517 | );
518 | name = "Sources";
519 | path = "";
520 | sourceTree = "SOURCE_ROOT";
521 | };
522 | "OBJ_8" = {
523 | isa = "PBXGroup";
524 | children = (
525 | "OBJ_9"
526 | );
527 | name = "SwiftHEXColors";
528 | path = "Sources/SwiftHEXColors";
529 | sourceTree = "SOURCE_ROOT";
530 | };
531 | "OBJ_9" = {
532 | isa = "PBXFileReference";
533 | path = "SwiftHEXColors.swift";
534 | sourceTree = "";
535 | };
536 | "SwiftHEXColors::SwiftHEXColors" = {
537 | isa = "PBXNativeTarget";
538 | buildConfigurationList = "OBJ_25";
539 | buildPhases = (
540 | "OBJ_28",
541 | "OBJ_30"
542 | );
543 | dependencies = (
544 | );
545 | name = "SwiftHEXColors";
546 | productName = "SwiftHEXColors";
547 | productReference = "SwiftHEXColors::SwiftHEXColors::Product";
548 | productType = "com.apple.product-type.framework";
549 | };
550 | "SwiftHEXColors::SwiftHEXColors::Product" = {
551 | isa = "PBXFileReference";
552 | path = "SwiftHEXColors.framework";
553 | sourceTree = "BUILT_PRODUCTS_DIR";
554 | };
555 | "SwiftHEXColors::SwiftHEXColorsPackageTests::ProductTarget" = {
556 | isa = "PBXAggregateTarget";
557 | buildConfigurationList = "OBJ_38";
558 | buildPhases = (
559 | );
560 | dependencies = (
561 | "OBJ_41"
562 | );
563 | name = "SwiftHEXColorsPackageTests";
564 | productName = "SwiftHEXColorsPackageTests";
565 | };
566 | "SwiftHEXColors::SwiftHEXColorsTests" = {
567 | isa = "PBXNativeTarget";
568 | buildConfigurationList = "OBJ_43";
569 | buildPhases = (
570 | "OBJ_46",
571 | "OBJ_48"
572 | );
573 | dependencies = (
574 | "OBJ_50"
575 | );
576 | name = "SwiftHEXColorsTests";
577 | productName = "SwiftHEXColorsTests";
578 | productReference = "SwiftHEXColors::SwiftHEXColorsTests::Product";
579 | productType = "com.apple.product-type.bundle.unit-test";
580 | };
581 | "SwiftHEXColors::SwiftHEXColorsTests::Product" = {
582 | isa = "PBXFileReference";
583 | path = "SwiftHEXColorsTests.xctest";
584 | sourceTree = "BUILT_PRODUCTS_DIR";
585 | };
586 | "SwiftHEXColors::SwiftPMPackageDescription" = {
587 | isa = "PBXNativeTarget";
588 | buildConfigurationList = "OBJ_32";
589 | buildPhases = (
590 | "OBJ_35"
591 | );
592 | dependencies = (
593 | );
594 | name = "SwiftHEXColorsPackageDescription";
595 | productName = "SwiftHEXColorsPackageDescription";
596 | productType = "com.apple.product-type.framework";
597 | };
598 | };
599 | rootObject = "OBJ_1";
600 | }
601 |
--------------------------------------------------------------------------------