├── .gitignore ├── .slather.yml ├── .swift-version ├── .travis.yml ├── HexColor.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ ├── HexColor iOS.xcscheme │ ├── HexColor tvOS.xcscheme │ └── HexColor watchOS.xcscheme ├── HexColor ├── HexColor.h ├── HexColor.swift └── Info.plist ├── HexColorTests ├── HexColorTests.swift └── Info.plist ├── HxColor.podspec ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | *.pbxuser 3 | !default.pbxuser 4 | *.mode1v3 5 | !default.mode1v3 6 | *.mode2v3 7 | !default.mode2v3 8 | *.perspectivev3 9 | !default.perspectivev3 10 | xcuserdata 11 | *.xccheckout 12 | *.moved-aside 13 | DerivedData 14 | *.hmap 15 | *.ipa 16 | *.xcuserstate -------------------------------------------------------------------------------- /.slather.yml: -------------------------------------------------------------------------------- 1 | ci_service: travis_ci 2 | coverage_service: coveralls 3 | xcodeproj: HexColor.xcodeproj 4 | source_directory: HexColor 5 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 4.0 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode9 3 | env: 4 | global: 5 | - LC_CTYPE=en_US.UTF-8 6 | - LANG=en_US.UTF-8 7 | - PROJECT=HexColor.xcodeproj 8 | - IOS_FRAMEWORK_SCHEME="HexColor iOS" 9 | - TVOS_FRAMEWORK_SCHEME="HexColor tvOS" 10 | - WATCHOS_FRAMEWORK_SCHEME="HexColor watchOS" 11 | 12 | matrix: 13 | - DESTINATION="OS=8.1,name=iPhone 4S" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" POD_LINT="NO" 14 | - DESTINATION="OS=9.0,name=iPhone 6" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" POD_LINT="NO" 15 | - DESTINATION="OS=10.1,name=iPhone 7 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" POD_LINT="NO" 16 | - DESTINATION="OS=11.0,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" POD_LINT="NO" 17 | - DESTINATION="OS=11.0,name=Apple TV 4K" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" POD_LINT="NO" 18 | - DESTINATION="OS=4.0,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" POD_LINT="NO" 19 | 20 | before_install: 21 | - gem install slather -N 22 | - gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet 23 | 24 | script: 25 | - set -o pipefail 26 | - xcodebuild -version 27 | - xcodebuild -showsdks 28 | - instruments -s devices 29 | 30 | - if [ $RUN_TESTS == "YES" ]; then 31 | xcodebuild -project "$PROJECT" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty; 32 | else 33 | xcodebuild -project "$PROJECT" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; 34 | fi 35 | 36 | - if [ $RUN_TESTS == "YES" ]; then 37 | xcodebuild -project "$PROJECT" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty; 38 | else 39 | xcodebuild -project "$PROJECT" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty; 40 | fi 41 | 42 | - if [ $POD_LINT == "YES" ]; then 43 | pod lib lint; 44 | fi 45 | 46 | after_success: 47 | - ./coveralls.rb -x swift -e "HexColor iOS" 48 | 49 | notifications: 50 | email: false 51 | -------------------------------------------------------------------------------- /HexColor.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 722F79BF1DFD07040054846F /* HexColor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 722F79B61DFD07030054846F /* HexColor.framework */; }; 11 | 722F79CD1DFD07350054846F /* HexColor.h in Headers */ = {isa = PBXBuildFile; fileRef = 7228B6EB19B5353600A81D94 /* HexColor.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 722F79CE1DFD07360054846F /* HexColor.h in Headers */ = {isa = PBXBuildFile; fileRef = 7228B6EB19B5353600A81D94 /* HexColor.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 722F79CF1DFD073D0054846F /* HexColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7228B6FF19B535B000A81D94 /* HexColor.swift */; }; 14 | 722F79D01DFD073E0054846F /* HexColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7228B6FF19B535B000A81D94 /* HexColor.swift */; }; 15 | 722F79D11DFD074B0054846F /* HexColorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7228B6F519B5353600A81D94 /* HexColorTests.swift */; }; 16 | 722F79E21DFD0A260054846F /* HexColor.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 722F79D91DFD0A260054846F /* HexColor.framework */; }; 17 | 722F79F01DFD0A5A0054846F /* HexColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7228B6FF19B535B000A81D94 /* HexColor.swift */; }; 18 | 722F79F11DFD0A5E0054846F /* HexColorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7228B6F519B5353600A81D94 /* HexColorTests.swift */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 722F79C01DFD07040054846F /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 7228B6DD19B5353600A81D94 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 722F79B51DFD07030054846F; 27 | remoteInfo = "HexColor tvOS"; 28 | }; 29 | 722F79E31DFD0A260054846F /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 7228B6DD19B5353600A81D94 /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = 722F79D81DFD0A260054846F; 34 | remoteInfo = "HexColor iOS"; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 7228B6EA19B5353600A81D94 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 40 | 7228B6EB19B5353600A81D94 /* HexColor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HexColor.h; sourceTree = ""; }; 41 | 7228B6F419B5353600A81D94 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 42 | 7228B6F519B5353600A81D94 /* HexColorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HexColorTests.swift; sourceTree = ""; }; 43 | 7228B6FF19B535B000A81D94 /* HexColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HexColor.swift; sourceTree = ""; }; 44 | 722F79A91DFD06E70054846F /* HexColor.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HexColor.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 722F79B61DFD07030054846F /* HexColor.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HexColor.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 722F79BE1DFD07040054846F /* HexColor tvOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "HexColor tvOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | 722F79D91DFD0A260054846F /* HexColor.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HexColor.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 722F79E11DFD0A260054846F /* HexColor iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "HexColor iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 726FD31F1BC06B5500A97A69 /* HxColor.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = HxColor.podspec; sourceTree = ""; }; 50 | 72A049AC1F90849200830E12 /* test.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = test.h; sourceTree = ""; }; 51 | 72A049AD1F9084A400830E12 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 72A049B91F9086D600830E12 /* test.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = test.h; sourceTree = ""; }; 53 | 72A049BA1F9086D600830E12 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | 72A3F8111B8182AB003A946C /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 55 | 72A3F8141B8188BC003A946C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | 722F79A51DFD06E70054846F /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | 722F79B21DFD07030054846F /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | 722F79BB1DFD07040054846F /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | 722F79BF1DFD07040054846F /* HexColor.framework in Frameworks */, 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | 722F79D51DFD0A260054846F /* Frameworks */ = { 82 | isa = PBXFrameworksBuildPhase; 83 | buildActionMask = 2147483647; 84 | files = ( 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | 722F79DE1DFD0A260054846F /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | 722F79E21DFD0A260054846F /* HexColor.framework in Frameworks */, 93 | ); 94 | runOnlyForDeploymentPostprocessing = 0; 95 | }; 96 | /* End PBXFrameworksBuildPhase section */ 97 | 98 | /* Begin PBXGroup section */ 99 | 7228B6DC19B5353600A81D94 = { 100 | isa = PBXGroup; 101 | children = ( 102 | 726FD31F1BC06B5500A97A69 /* HxColor.podspec */, 103 | 7228B6E819B5353600A81D94 /* HexColor */, 104 | 7228B6F219B5353600A81D94 /* HexColorTests */, 105 | 72A049AB1F90849200830E12 /* test */, 106 | 72A049B81F9086D600830E12 /* test */, 107 | 726FD31E1BC06B2000A97A69 /* Frameworks */, 108 | 7228B6E719B5353600A81D94 /* Products */, 109 | ); 110 | sourceTree = ""; 111 | }; 112 | 7228B6E719B5353600A81D94 /* Products */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | 722F79A91DFD06E70054846F /* HexColor.framework */, 116 | 722F79B61DFD07030054846F /* HexColor.framework */, 117 | 722F79BE1DFD07040054846F /* HexColor tvOS Tests.xctest */, 118 | 722F79D91DFD0A260054846F /* HexColor.framework */, 119 | 722F79E11DFD0A260054846F /* HexColor iOS Tests.xctest */, 120 | ); 121 | name = Products; 122 | sourceTree = ""; 123 | }; 124 | 7228B6E819B5353600A81D94 /* HexColor */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 7228B6EB19B5353600A81D94 /* HexColor.h */, 128 | 7228B6FF19B535B000A81D94 /* HexColor.swift */, 129 | 7228B6E919B5353600A81D94 /* Supporting Files */, 130 | ); 131 | path = HexColor; 132 | sourceTree = ""; 133 | }; 134 | 7228B6E919B5353600A81D94 /* Supporting Files */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 7228B6EA19B5353600A81D94 /* Info.plist */, 138 | ); 139 | name = "Supporting Files"; 140 | sourceTree = ""; 141 | }; 142 | 7228B6F219B5353600A81D94 /* HexColorTests */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 7228B6F519B5353600A81D94 /* HexColorTests.swift */, 146 | 7228B6F319B5353600A81D94 /* Supporting Files */, 147 | ); 148 | path = HexColorTests; 149 | sourceTree = ""; 150 | }; 151 | 7228B6F319B5353600A81D94 /* Supporting Files */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | 7228B6F419B5353600A81D94 /* Info.plist */, 155 | ); 156 | name = "Supporting Files"; 157 | sourceTree = ""; 158 | }; 159 | 726FD31E1BC06B2000A97A69 /* Frameworks */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 72A3F8141B8188BC003A946C /* Foundation.framework */, 163 | 72A3F8111B8182AB003A946C /* UIKit.framework */, 164 | ); 165 | name = Frameworks; 166 | sourceTree = ""; 167 | }; 168 | 72A049AB1F90849200830E12 /* test */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 72A049AC1F90849200830E12 /* test.h */, 172 | 72A049AD1F9084A400830E12 /* Info.plist */, 173 | ); 174 | path = test; 175 | sourceTree = ""; 176 | }; 177 | 72A049B81F9086D600830E12 /* test */ = { 178 | isa = PBXGroup; 179 | children = ( 180 | 72A049B91F9086D600830E12 /* test.h */, 181 | 72A049BA1F9086D600830E12 /* Info.plist */, 182 | ); 183 | path = test; 184 | sourceTree = ""; 185 | }; 186 | /* End PBXGroup section */ 187 | 188 | /* Begin PBXHeadersBuildPhase section */ 189 | 722F79A61DFD06E70054846F /* Headers */ = { 190 | isa = PBXHeadersBuildPhase; 191 | buildActionMask = 2147483647; 192 | files = ( 193 | 722F79CD1DFD07350054846F /* HexColor.h in Headers */, 194 | ); 195 | runOnlyForDeploymentPostprocessing = 0; 196 | }; 197 | 722F79B31DFD07030054846F /* Headers */ = { 198 | isa = PBXHeadersBuildPhase; 199 | buildActionMask = 2147483647; 200 | files = ( 201 | 722F79CE1DFD07360054846F /* HexColor.h in Headers */, 202 | ); 203 | runOnlyForDeploymentPostprocessing = 0; 204 | }; 205 | 722F79D61DFD0A260054846F /* Headers */ = { 206 | isa = PBXHeadersBuildPhase; 207 | buildActionMask = 2147483647; 208 | files = ( 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXHeadersBuildPhase section */ 213 | 214 | /* Begin PBXNativeTarget section */ 215 | 722F79A81DFD06E70054846F /* HexColor watchOS */ = { 216 | isa = PBXNativeTarget; 217 | buildConfigurationList = 722F79AE1DFD06E70054846F /* Build configuration list for PBXNativeTarget "HexColor watchOS" */; 218 | buildPhases = ( 219 | 722F79A41DFD06E70054846F /* Sources */, 220 | 722F79A51DFD06E70054846F /* Frameworks */, 221 | 722F79A61DFD06E70054846F /* Headers */, 222 | 722F79A71DFD06E70054846F /* Resources */, 223 | ); 224 | buildRules = ( 225 | ); 226 | dependencies = ( 227 | ); 228 | name = "HexColor watchOS"; 229 | productName = "HexColor watchOS"; 230 | productReference = 722F79A91DFD06E70054846F /* HexColor.framework */; 231 | productType = "com.apple.product-type.framework"; 232 | }; 233 | 722F79B51DFD07030054846F /* HexColor tvOS */ = { 234 | isa = PBXNativeTarget; 235 | buildConfigurationList = 722F79C71DFD07040054846F /* Build configuration list for PBXNativeTarget "HexColor tvOS" */; 236 | buildPhases = ( 237 | 722F79B11DFD07030054846F /* Sources */, 238 | 722F79B21DFD07030054846F /* Frameworks */, 239 | 722F79B31DFD07030054846F /* Headers */, 240 | 722F79B41DFD07030054846F /* Resources */, 241 | ); 242 | buildRules = ( 243 | ); 244 | dependencies = ( 245 | ); 246 | name = "HexColor tvOS"; 247 | productName = "HexColor tvOS"; 248 | productReference = 722F79B61DFD07030054846F /* HexColor.framework */; 249 | productType = "com.apple.product-type.framework"; 250 | }; 251 | 722F79BD1DFD07040054846F /* HexColor tvOS Tests */ = { 252 | isa = PBXNativeTarget; 253 | buildConfigurationList = 722F79CA1DFD07040054846F /* Build configuration list for PBXNativeTarget "HexColor tvOS Tests" */; 254 | buildPhases = ( 255 | 722F79BA1DFD07040054846F /* Sources */, 256 | 722F79BB1DFD07040054846F /* Frameworks */, 257 | 722F79BC1DFD07040054846F /* Resources */, 258 | ); 259 | buildRules = ( 260 | ); 261 | dependencies = ( 262 | 722F79C11DFD07040054846F /* PBXTargetDependency */, 263 | ); 264 | name = "HexColor tvOS Tests"; 265 | productName = "HexColor tvOSTests"; 266 | productReference = 722F79BE1DFD07040054846F /* HexColor tvOS Tests.xctest */; 267 | productType = "com.apple.product-type.bundle.unit-test"; 268 | }; 269 | 722F79D81DFD0A260054846F /* HexColor iOS */ = { 270 | isa = PBXNativeTarget; 271 | buildConfigurationList = 722F79EA1DFD0A260054846F /* Build configuration list for PBXNativeTarget "HexColor iOS" */; 272 | buildPhases = ( 273 | 722F79D41DFD0A260054846F /* Sources */, 274 | 722F79D51DFD0A260054846F /* Frameworks */, 275 | 722F79D61DFD0A260054846F /* Headers */, 276 | 722F79D71DFD0A260054846F /* Resources */, 277 | ); 278 | buildRules = ( 279 | ); 280 | dependencies = ( 281 | ); 282 | name = "HexColor iOS"; 283 | productName = "HexColor iOS"; 284 | productReference = 722F79D91DFD0A260054846F /* HexColor.framework */; 285 | productType = "com.apple.product-type.framework"; 286 | }; 287 | 722F79E01DFD0A260054846F /* HexColor iOS Tests */ = { 288 | isa = PBXNativeTarget; 289 | buildConfigurationList = 722F79ED1DFD0A260054846F /* Build configuration list for PBXNativeTarget "HexColor iOS Tests" */; 290 | buildPhases = ( 291 | 722F79DD1DFD0A260054846F /* Sources */, 292 | 722F79DE1DFD0A260054846F /* Frameworks */, 293 | 722F79DF1DFD0A260054846F /* Resources */, 294 | ); 295 | buildRules = ( 296 | ); 297 | dependencies = ( 298 | 722F79E41DFD0A260054846F /* PBXTargetDependency */, 299 | ); 300 | name = "HexColor iOS Tests"; 301 | productName = "HexColor iOSTests"; 302 | productReference = 722F79E11DFD0A260054846F /* HexColor iOS Tests.xctest */; 303 | productType = "com.apple.product-type.bundle.unit-test"; 304 | }; 305 | /* End PBXNativeTarget section */ 306 | 307 | /* Begin PBXProject section */ 308 | 7228B6DD19B5353600A81D94 /* Project object */ = { 309 | isa = PBXProject; 310 | attributes = { 311 | LastSwiftMigration = 0700; 312 | LastSwiftUpdateCheck = 0810; 313 | LastUpgradeCheck = 0900; 314 | ORGANIZATIONNAME = "Tuomas Artman"; 315 | TargetAttributes = { 316 | 722F79A81DFD06E70054846F = { 317 | CreatedOnToolsVersion = 8.1; 318 | ProvisioningStyle = Automatic; 319 | }; 320 | 722F79B51DFD07030054846F = { 321 | CreatedOnToolsVersion = 8.1; 322 | LastSwiftMigration = 0900; 323 | ProvisioningStyle = Automatic; 324 | }; 325 | 722F79BD1DFD07040054846F = { 326 | CreatedOnToolsVersion = 8.1; 327 | LastSwiftMigration = 0900; 328 | ProvisioningStyle = Automatic; 329 | }; 330 | 722F79D81DFD0A260054846F = { 331 | CreatedOnToolsVersion = 8.1; 332 | ProvisioningStyle = Automatic; 333 | }; 334 | 722F79E01DFD0A260054846F = { 335 | CreatedOnToolsVersion = 8.1; 336 | ProvisioningStyle = Automatic; 337 | }; 338 | }; 339 | }; 340 | buildConfigurationList = 7228B6E019B5353600A81D94 /* Build configuration list for PBXProject "HexColor" */; 341 | compatibilityVersion = "Xcode 3.2"; 342 | developmentRegion = English; 343 | hasScannedForEncodings = 0; 344 | knownRegions = ( 345 | en, 346 | ); 347 | mainGroup = 7228B6DC19B5353600A81D94; 348 | productRefGroup = 7228B6E719B5353600A81D94 /* Products */; 349 | projectDirPath = ""; 350 | projectRoot = ""; 351 | targets = ( 352 | 722F79D81DFD0A260054846F /* HexColor iOS */, 353 | 722F79E01DFD0A260054846F /* HexColor iOS Tests */, 354 | 722F79B51DFD07030054846F /* HexColor tvOS */, 355 | 722F79BD1DFD07040054846F /* HexColor tvOS Tests */, 356 | 722F79A81DFD06E70054846F /* HexColor watchOS */, 357 | ); 358 | }; 359 | /* End PBXProject section */ 360 | 361 | /* Begin PBXResourcesBuildPhase section */ 362 | 722F79A71DFD06E70054846F /* Resources */ = { 363 | isa = PBXResourcesBuildPhase; 364 | buildActionMask = 2147483647; 365 | files = ( 366 | ); 367 | runOnlyForDeploymentPostprocessing = 0; 368 | }; 369 | 722F79B41DFD07030054846F /* Resources */ = { 370 | isa = PBXResourcesBuildPhase; 371 | buildActionMask = 2147483647; 372 | files = ( 373 | ); 374 | runOnlyForDeploymentPostprocessing = 0; 375 | }; 376 | 722F79BC1DFD07040054846F /* Resources */ = { 377 | isa = PBXResourcesBuildPhase; 378 | buildActionMask = 2147483647; 379 | files = ( 380 | ); 381 | runOnlyForDeploymentPostprocessing = 0; 382 | }; 383 | 722F79D71DFD0A260054846F /* Resources */ = { 384 | isa = PBXResourcesBuildPhase; 385 | buildActionMask = 2147483647; 386 | files = ( 387 | ); 388 | runOnlyForDeploymentPostprocessing = 0; 389 | }; 390 | 722F79DF1DFD0A260054846F /* Resources */ = { 391 | isa = PBXResourcesBuildPhase; 392 | buildActionMask = 2147483647; 393 | files = ( 394 | ); 395 | runOnlyForDeploymentPostprocessing = 0; 396 | }; 397 | /* End PBXResourcesBuildPhase section */ 398 | 399 | /* Begin PBXSourcesBuildPhase section */ 400 | 722F79A41DFD06E70054846F /* Sources */ = { 401 | isa = PBXSourcesBuildPhase; 402 | buildActionMask = 2147483647; 403 | files = ( 404 | 722F79CF1DFD073D0054846F /* HexColor.swift in Sources */, 405 | ); 406 | runOnlyForDeploymentPostprocessing = 0; 407 | }; 408 | 722F79B11DFD07030054846F /* Sources */ = { 409 | isa = PBXSourcesBuildPhase; 410 | buildActionMask = 2147483647; 411 | files = ( 412 | 722F79D01DFD073E0054846F /* HexColor.swift in Sources */, 413 | ); 414 | runOnlyForDeploymentPostprocessing = 0; 415 | }; 416 | 722F79BA1DFD07040054846F /* Sources */ = { 417 | isa = PBXSourcesBuildPhase; 418 | buildActionMask = 2147483647; 419 | files = ( 420 | 722F79D11DFD074B0054846F /* HexColorTests.swift in Sources */, 421 | ); 422 | runOnlyForDeploymentPostprocessing = 0; 423 | }; 424 | 722F79D41DFD0A260054846F /* Sources */ = { 425 | isa = PBXSourcesBuildPhase; 426 | buildActionMask = 2147483647; 427 | files = ( 428 | 722F79F01DFD0A5A0054846F /* HexColor.swift in Sources */, 429 | ); 430 | runOnlyForDeploymentPostprocessing = 0; 431 | }; 432 | 722F79DD1DFD0A260054846F /* Sources */ = { 433 | isa = PBXSourcesBuildPhase; 434 | buildActionMask = 2147483647; 435 | files = ( 436 | 722F79F11DFD0A5E0054846F /* HexColorTests.swift in Sources */, 437 | ); 438 | runOnlyForDeploymentPostprocessing = 0; 439 | }; 440 | /* End PBXSourcesBuildPhase section */ 441 | 442 | /* Begin PBXTargetDependency section */ 443 | 722F79C11DFD07040054846F /* PBXTargetDependency */ = { 444 | isa = PBXTargetDependency; 445 | target = 722F79B51DFD07030054846F /* HexColor tvOS */; 446 | targetProxy = 722F79C01DFD07040054846F /* PBXContainerItemProxy */; 447 | }; 448 | 722F79E41DFD0A260054846F /* PBXTargetDependency */ = { 449 | isa = PBXTargetDependency; 450 | target = 722F79D81DFD0A260054846F /* HexColor iOS */; 451 | targetProxy = 722F79E31DFD0A260054846F /* PBXContainerItemProxy */; 452 | }; 453 | /* End PBXTargetDependency section */ 454 | 455 | /* Begin XCBuildConfiguration section */ 456 | 7228B6F719B5353600A81D94 /* Debug */ = { 457 | isa = XCBuildConfiguration; 458 | buildSettings = { 459 | ALWAYS_SEARCH_USER_PATHS = NO; 460 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 461 | CLANG_CXX_LIBRARY = "libc++"; 462 | CLANG_ENABLE_MODULES = YES; 463 | CLANG_ENABLE_OBJC_ARC = YES; 464 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 465 | CLANG_WARN_BOOL_CONVERSION = YES; 466 | CLANG_WARN_COMMA = YES; 467 | CLANG_WARN_CONSTANT_CONVERSION = YES; 468 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 469 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 470 | CLANG_WARN_EMPTY_BODY = YES; 471 | CLANG_WARN_ENUM_CONVERSION = YES; 472 | CLANG_WARN_INFINITE_RECURSION = YES; 473 | CLANG_WARN_INT_CONVERSION = YES; 474 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 475 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 476 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 477 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 478 | CLANG_WARN_STRICT_PROTOTYPES = YES; 479 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 480 | CLANG_WARN_UNREACHABLE_CODE = YES; 481 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 482 | COPY_PHASE_STRIP = NO; 483 | CURRENT_PROJECT_VERSION = 1; 484 | ENABLE_STRICT_OBJC_MSGSEND = YES; 485 | ENABLE_TESTABILITY = YES; 486 | GCC_C_LANGUAGE_STANDARD = gnu99; 487 | GCC_DYNAMIC_NO_PIC = NO; 488 | GCC_NO_COMMON_BLOCKS = YES; 489 | GCC_OPTIMIZATION_LEVEL = 0; 490 | GCC_PREPROCESSOR_DEFINITIONS = ( 491 | "DEBUG=1", 492 | "$(inherited)", 493 | ); 494 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 495 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 496 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 497 | GCC_WARN_UNDECLARED_SELECTOR = YES; 498 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 499 | GCC_WARN_UNUSED_FUNCTION = YES; 500 | GCC_WARN_UNUSED_VARIABLE = YES; 501 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 502 | ONLY_ACTIVE_ARCH = YES; 503 | SDKROOT = iphoneos; 504 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 505 | SWIFT_VERSION = 4.0; 506 | TARGETED_DEVICE_FAMILY = "1,2"; 507 | VERSIONING_SYSTEM = "apple-generic"; 508 | VERSION_INFO_PREFIX = ""; 509 | }; 510 | name = Debug; 511 | }; 512 | 7228B6F819B5353600A81D94 /* Release */ = { 513 | isa = XCBuildConfiguration; 514 | buildSettings = { 515 | ALWAYS_SEARCH_USER_PATHS = NO; 516 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 517 | CLANG_CXX_LIBRARY = "libc++"; 518 | CLANG_ENABLE_MODULES = YES; 519 | CLANG_ENABLE_OBJC_ARC = YES; 520 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 521 | CLANG_WARN_BOOL_CONVERSION = YES; 522 | CLANG_WARN_COMMA = YES; 523 | CLANG_WARN_CONSTANT_CONVERSION = YES; 524 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 525 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 526 | CLANG_WARN_EMPTY_BODY = YES; 527 | CLANG_WARN_ENUM_CONVERSION = YES; 528 | CLANG_WARN_INFINITE_RECURSION = YES; 529 | CLANG_WARN_INT_CONVERSION = YES; 530 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 531 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 532 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 533 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 534 | CLANG_WARN_STRICT_PROTOTYPES = YES; 535 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 536 | CLANG_WARN_UNREACHABLE_CODE = YES; 537 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 538 | COPY_PHASE_STRIP = YES; 539 | CURRENT_PROJECT_VERSION = 1; 540 | ENABLE_NS_ASSERTIONS = NO; 541 | ENABLE_STRICT_OBJC_MSGSEND = YES; 542 | GCC_C_LANGUAGE_STANDARD = gnu99; 543 | GCC_NO_COMMON_BLOCKS = YES; 544 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 545 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 546 | GCC_WARN_UNDECLARED_SELECTOR = YES; 547 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 548 | GCC_WARN_UNUSED_FUNCTION = YES; 549 | GCC_WARN_UNUSED_VARIABLE = YES; 550 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 551 | SDKROOT = iphoneos; 552 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 553 | SWIFT_VERSION = 4.0; 554 | TARGETED_DEVICE_FAMILY = "1,2"; 555 | VALIDATE_PRODUCT = YES; 556 | VERSIONING_SYSTEM = "apple-generic"; 557 | VERSION_INFO_PREFIX = ""; 558 | }; 559 | name = Release; 560 | }; 561 | 722F79AF1DFD06E70054846F /* Debug */ = { 562 | isa = XCBuildConfiguration; 563 | buildSettings = { 564 | APPLICATION_EXTENSION_API_ONLY = YES; 565 | CODE_SIGN_IDENTITY = ""; 566 | DEBUG_INFORMATION_FORMAT = dwarf; 567 | DEFINES_MODULE = YES; 568 | DYLIB_COMPATIBILITY_VERSION = 1; 569 | DYLIB_CURRENT_VERSION = 1; 570 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 571 | INFOPLIST_FILE = HexColor/Info.plist; 572 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 573 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 574 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.$(PRODUCT_NAME:rfc1034identifier)"; 575 | PRODUCT_NAME = HexColor; 576 | SDKROOT = watchos; 577 | SKIP_INSTALL = YES; 578 | TARGETED_DEVICE_FAMILY = 4; 579 | WATCHOS_DEPLOYMENT_TARGET = 3.1; 580 | }; 581 | name = Debug; 582 | }; 583 | 722F79B01DFD06E70054846F /* Release */ = { 584 | isa = XCBuildConfiguration; 585 | buildSettings = { 586 | APPLICATION_EXTENSION_API_ONLY = YES; 587 | CODE_SIGN_IDENTITY = ""; 588 | COPY_PHASE_STRIP = NO; 589 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 590 | DEFINES_MODULE = YES; 591 | DYLIB_COMPATIBILITY_VERSION = 1; 592 | DYLIB_CURRENT_VERSION = 1; 593 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 594 | INFOPLIST_FILE = HexColor/Info.plist; 595 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 596 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 597 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.$(PRODUCT_NAME:rfc1034identifier)"; 598 | PRODUCT_NAME = HexColor; 599 | SDKROOT = watchos; 600 | SKIP_INSTALL = YES; 601 | TARGETED_DEVICE_FAMILY = 4; 602 | WATCHOS_DEPLOYMENT_TARGET = 3.1; 603 | }; 604 | name = Release; 605 | }; 606 | 722F79C81DFD07040054846F /* Debug */ = { 607 | isa = XCBuildConfiguration; 608 | buildSettings = { 609 | CODE_SIGN_IDENTITY = ""; 610 | COPY_PHASE_STRIP = NO; 611 | DEBUG_INFORMATION_FORMAT = dwarf; 612 | DEFINES_MODULE = YES; 613 | DYLIB_COMPATIBILITY_VERSION = 1; 614 | DYLIB_CURRENT_VERSION = 1; 615 | INFOPLIST_FILE = HexColor/Info.plist; 616 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 617 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 618 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.$(PRODUCT_NAME:rfc1034identifier)"; 619 | PRODUCT_NAME = HexColor; 620 | SDKROOT = appletvos; 621 | SKIP_INSTALL = YES; 622 | TARGETED_DEVICE_FAMILY = 3; 623 | TVOS_DEPLOYMENT_TARGET = 9.0; 624 | }; 625 | name = Debug; 626 | }; 627 | 722F79C91DFD07040054846F /* Release */ = { 628 | isa = XCBuildConfiguration; 629 | buildSettings = { 630 | CODE_SIGN_IDENTITY = ""; 631 | COPY_PHASE_STRIP = NO; 632 | DEFINES_MODULE = YES; 633 | DYLIB_COMPATIBILITY_VERSION = 1; 634 | DYLIB_CURRENT_VERSION = 1; 635 | INFOPLIST_FILE = HexColor/Info.plist; 636 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 637 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 638 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.$(PRODUCT_NAME:rfc1034identifier)"; 639 | PRODUCT_NAME = HexColor; 640 | SDKROOT = appletvos; 641 | SKIP_INSTALL = YES; 642 | TARGETED_DEVICE_FAMILY = 3; 643 | TVOS_DEPLOYMENT_TARGET = 9.0; 644 | }; 645 | name = Release; 646 | }; 647 | 722F79CB1DFD07040054846F /* Debug */ = { 648 | isa = XCBuildConfiguration; 649 | buildSettings = { 650 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 651 | DEBUG_INFORMATION_FORMAT = dwarf; 652 | INFOPLIST_FILE = HexColorTests/Info.plist; 653 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 654 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.$(PRODUCT_NAME:rfc1034identifier)"; 655 | PRODUCT_NAME = "$(TARGET_NAME)"; 656 | SDKROOT = appletvos; 657 | TVOS_DEPLOYMENT_TARGET = 9.0; 658 | }; 659 | name = Debug; 660 | }; 661 | 722F79CC1DFD07040054846F /* Release */ = { 662 | isa = XCBuildConfiguration; 663 | buildSettings = { 664 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 665 | COPY_PHASE_STRIP = NO; 666 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 667 | INFOPLIST_FILE = HexColorTests/Info.plist; 668 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 669 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.$(PRODUCT_NAME:rfc1034identifier)"; 670 | PRODUCT_NAME = "$(TARGET_NAME)"; 671 | SDKROOT = appletvos; 672 | TVOS_DEPLOYMENT_TARGET = 9.0; 673 | }; 674 | name = Release; 675 | }; 676 | 722F79EB1DFD0A260054846F /* Debug */ = { 677 | isa = XCBuildConfiguration; 678 | buildSettings = { 679 | DEBUG_INFORMATION_FORMAT = dwarf; 680 | DEFINES_MODULE = YES; 681 | DYLIB_COMPATIBILITY_VERSION = 1; 682 | DYLIB_CURRENT_VERSION = 1; 683 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 684 | INFOPLIST_FILE = HexColor/Info.plist; 685 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 686 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.HexColor-iOS"; 687 | PRODUCT_NAME = HexColor; 688 | SDKROOT = iphoneos; 689 | }; 690 | name = Debug; 691 | }; 692 | 722F79EC1DFD0A260054846F /* Release */ = { 693 | isa = XCBuildConfiguration; 694 | buildSettings = { 695 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 696 | DEFINES_MODULE = YES; 697 | DYLIB_COMPATIBILITY_VERSION = 1; 698 | DYLIB_CURRENT_VERSION = 1; 699 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 700 | INFOPLIST_FILE = HexColor/Info.plist; 701 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 702 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.HexColor-iOS"; 703 | PRODUCT_NAME = HexColor; 704 | SDKROOT = iphoneos; 705 | }; 706 | name = Release; 707 | }; 708 | 722F79EE1DFD0A260054846F /* Debug */ = { 709 | isa = XCBuildConfiguration; 710 | buildSettings = { 711 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 712 | INFOPLIST_FILE = HexColorTests/Info.plist; 713 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 714 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.HexColor-iOSTests"; 715 | PRODUCT_NAME = "$(TARGET_NAME)"; 716 | }; 717 | name = Debug; 718 | }; 719 | 722F79EF1DFD0A260054846F /* Release */ = { 720 | isa = XCBuildConfiguration; 721 | buildSettings = { 722 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 723 | COPY_PHASE_STRIP = NO; 724 | INFOPLIST_FILE = HexColorTests/Info.plist; 725 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 726 | PRODUCT_BUNDLE_IDENTIFIER = "fi.artman.HexColor-iOSTests"; 727 | PRODUCT_NAME = "$(TARGET_NAME)"; 728 | }; 729 | name = Release; 730 | }; 731 | /* End XCBuildConfiguration section */ 732 | 733 | /* Begin XCConfigurationList section */ 734 | 7228B6E019B5353600A81D94 /* Build configuration list for PBXProject "HexColor" */ = { 735 | isa = XCConfigurationList; 736 | buildConfigurations = ( 737 | 7228B6F719B5353600A81D94 /* Debug */, 738 | 7228B6F819B5353600A81D94 /* Release */, 739 | ); 740 | defaultConfigurationIsVisible = 0; 741 | defaultConfigurationName = Release; 742 | }; 743 | 722F79AE1DFD06E70054846F /* Build configuration list for PBXNativeTarget "HexColor watchOS" */ = { 744 | isa = XCConfigurationList; 745 | buildConfigurations = ( 746 | 722F79AF1DFD06E70054846F /* Debug */, 747 | 722F79B01DFD06E70054846F /* Release */, 748 | ); 749 | defaultConfigurationIsVisible = 0; 750 | defaultConfigurationName = Release; 751 | }; 752 | 722F79C71DFD07040054846F /* Build configuration list for PBXNativeTarget "HexColor tvOS" */ = { 753 | isa = XCConfigurationList; 754 | buildConfigurations = ( 755 | 722F79C81DFD07040054846F /* Debug */, 756 | 722F79C91DFD07040054846F /* Release */, 757 | ); 758 | defaultConfigurationIsVisible = 0; 759 | defaultConfigurationName = Release; 760 | }; 761 | 722F79CA1DFD07040054846F /* Build configuration list for PBXNativeTarget "HexColor tvOS Tests" */ = { 762 | isa = XCConfigurationList; 763 | buildConfigurations = ( 764 | 722F79CB1DFD07040054846F /* Debug */, 765 | 722F79CC1DFD07040054846F /* Release */, 766 | ); 767 | defaultConfigurationIsVisible = 0; 768 | defaultConfigurationName = Release; 769 | }; 770 | 722F79EA1DFD0A260054846F /* Build configuration list for PBXNativeTarget "HexColor iOS" */ = { 771 | isa = XCConfigurationList; 772 | buildConfigurations = ( 773 | 722F79EB1DFD0A260054846F /* Debug */, 774 | 722F79EC1DFD0A260054846F /* Release */, 775 | ); 776 | defaultConfigurationIsVisible = 0; 777 | defaultConfigurationName = Release; 778 | }; 779 | 722F79ED1DFD0A260054846F /* Build configuration list for PBXNativeTarget "HexColor iOS Tests" */ = { 780 | isa = XCConfigurationList; 781 | buildConfigurations = ( 782 | 722F79EE1DFD0A260054846F /* Debug */, 783 | 722F79EF1DFD0A260054846F /* Release */, 784 | ); 785 | defaultConfigurationIsVisible = 0; 786 | defaultConfigurationName = Release; 787 | }; 788 | /* End XCConfigurationList section */ 789 | }; 790 | rootObject = 7228B6DD19B5353600A81D94 /* Project object */; 791 | } 792 | -------------------------------------------------------------------------------- /HexColor.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HexColor.xcodeproj/xcshareddata/xcschemes/HexColor iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 34 | 40 | 41 | 42 | 43 | 44 | 50 | 51 | 52 | 53 | 54 | 55 | 66 | 67 | 73 | 74 | 75 | 76 | 77 | 78 | 84 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /HexColor.xcodeproj/xcshareddata/xcschemes/HexColor tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 34 | 40 | 41 | 42 | 43 | 44 | 50 | 51 | 52 | 53 | 54 | 55 | 66 | 67 | 73 | 74 | 75 | 76 | 77 | 78 | 84 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /HexColor.xcodeproj/xcshareddata/xcschemes/HexColor watchOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 47 | 48 | 54 | 55 | 56 | 57 | 58 | 59 | 65 | 66 | 72 | 73 | 74 | 75 | 77 | 78 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /HexColor/HexColor.h: -------------------------------------------------------------------------------- 1 | // 2 | // HexColor.h 3 | // HexColor 4 | // 5 | // Created by Tuomas Artman on 1.9.2014. 6 | // Copyright (c) 2014 Tuomas Artman. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for HexColor. 12 | FOUNDATION_EXPORT double HexColorVersionNumber; 13 | 14 | //! Project version string for HexColor. 15 | FOUNDATION_EXPORT const unsigned char HexColorVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /HexColor/HexColor.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2014-2017 Tuomas Artman. All rights reserved. 3 | // 4 | 5 | import Foundation 6 | import UIKit 7 | 8 | extension UIColor { 9 | 10 | /// Initializes UIColor with an integer. 11 | /// 12 | /// - parameter value: The integer value of the color. E.g. `0xFF0000` is red, `0x0000FF` is blue. 13 | public convenience init(_ value: Int) { 14 | let components = UIColor.getColorComponents(value) 15 | self.init(red: components.red, green: components.green, blue: components.blue, alpha: 1.0) 16 | } 17 | 18 | /// Initializes UIColor with an integer and alpha value. 19 | /// 20 | /// - parameter value: The integer value of the color. E.g. `0xFF0000` is red, `0x0000FF` is blue. 21 | /// - parameter alpha: The alpha value. 22 | public convenience init(_ value: Int, alpha: CGFloat) { 23 | let components = UIColor.getColorComponents(value) 24 | self.init(red: components.red, green: components.green, blue: components.blue, alpha: alpha) 25 | } 26 | 27 | /// Creates a new color with the given alpha value. 28 | /// 29 | /// For example, `UIColor(0xFF0000).alpha(0.5)` defines a red color with 50% opacity. 30 | /// 31 | /// - returns: A UIColor representation of the Int with the given alpha value. 32 | public func alpha(_ value: CGFloat) -> UIKit.UIColor { 33 | var red: CGFloat = 0 34 | var green: CGFloat = 0 35 | var blue: CGFloat = 0 36 | var alpha: CGFloat = 0 37 | 38 | self.getRed(&red, green: &green, blue: &blue, alpha: &alpha) 39 | 40 | return UIKit.UIColor(red: red, green: green, blue: blue, alpha: value) 41 | } 42 | 43 | /// Mixes the color with another color. 44 | /// 45 | /// - parameter color: The color to mix with. 46 | /// - parameter amount: The amount (0-1) to mix the new color in. 47 | /// - returns: A new UIColor instance representing the resulting color. 48 | public func mix(with color: UIColor, amount: Float) -> UIColor { 49 | var r1: CGFloat = 0, g1: CGFloat = 0, b1: CGFloat = 0, a1: CGFloat = 0 50 | self.getRed(&r1, green: &g1, blue: &b1, alpha: &a1) 51 | 52 | var r2: CGFloat = 0, g2: CGFloat = 0, b2: CGFloat = 0, a2: CGFloat = 0 53 | color.getRed(&r2, green: &g2, blue: &b2, alpha: &a2) 54 | 55 | r1 = r1 + (r2 - r1) * CGFloat(amount) 56 | g1 = g1 + (g2 - g1) * CGFloat(amount) 57 | b1 = b1 + (b2 - b1) * CGFloat(amount) 58 | a1 = a1 + (a2 - a1) * CGFloat(amount) 59 | 60 | return UIColor(red: r1, green: g1, blue: b1, alpha: a1) 61 | } 62 | 63 | // MARK: - Private interface 64 | 65 | private static func getColorComponents(_ value: Int) -> (red: CGFloat, green: CGFloat, blue: CGFloat) { 66 | let r = CGFloat(value >> 16 & 0xFF) / 255.0 67 | let g = CGFloat(value >> 8 & 0xFF) / 255.0 68 | let b = CGFloat(value & 0xFF) / 255.0 69 | 70 | return (r, g, b) 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /HexColor/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 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /HexColorTests/HexColorTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HexColorTests.swift 3 | // HexColorTests 4 | // 5 | // Created by Tuomas Artman on 1.9.2014. 6 | // Copyright (c) 2014 Tuomas Artman. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | import HexColor 12 | 13 | class HexColorTests: XCTestCase { 14 | 15 | func testConversion() { 16 | let color = UIColor(0xFFEEDD) 17 | 18 | var red: CGFloat = 0 19 | var green: CGFloat = 0 20 | var blue: CGFloat = 0 21 | var alpha: CGFloat = 0 22 | 23 | color.getRed(&red, green: &green, blue: &blue, alpha: &alpha) 24 | 25 | XCTAssertEqual(red, 0xFF / 255.0, "Red component") 26 | XCTAssertEqual(green, 0xEE / 255.0, "Green component") 27 | XCTAssertEqual(blue, 0xDD / 255.0, "Blue component") 28 | } 29 | 30 | func testAssignment() { 31 | let label = UILabel() 32 | label.textColor = UIColor(0xFFEEDD) 33 | 34 | var red: CGFloat = 0 35 | var green: CGFloat = 0 36 | var blue: CGFloat = 0 37 | var alpha: CGFloat = 0 38 | 39 | label.textColor.getRed(&red, green: &green, blue: &blue, alpha: &alpha) 40 | 41 | XCTAssertEqual(red, 0xFF / 255.0, "Red component") 42 | XCTAssertEqual(green, 0xEE / 255.0, "Green component") 43 | XCTAssertEqual(blue, 0xDD / 255.0, "Blue component") 44 | } 45 | 46 | func testAlphaConstructor() { 47 | let color: UIColor = UIColor(0xFFEEDD, alpha: 0.1) 48 | 49 | var red: CGFloat = 0 50 | var green: CGFloat = 0 51 | var blue: CGFloat = 0 52 | var alpha: CGFloat = 0 53 | 54 | color.getRed(&red, green: &green, blue: &blue, alpha: &alpha) 55 | 56 | XCTAssertEqual(red, 0xFF / 255.0, "Red component") 57 | XCTAssertEqual(green, 0xEE / 255.0, "Green component") 58 | XCTAssertEqual(blue, 0xDD / 255.0, "Blue component") 59 | XCTAssertEqual(alpha, 0.1, "Alpha component") 60 | } 61 | 62 | func testAlpha() { 63 | let color: UIColor = UIColor(0xFFEEDD).alpha(0.1) 64 | 65 | var red: CGFloat = 0 66 | var green: CGFloat = 0 67 | var blue: CGFloat = 0 68 | var alpha: CGFloat = 0 69 | 70 | color.getRed(&red, green: &green, blue: &blue, alpha: &alpha) 71 | 72 | XCTAssertEqual(red, 0xFF / 255.0, "Red component") 73 | XCTAssertEqual(green, 0xEE / 255.0, "Green component") 74 | XCTAssertEqual(blue, 0xDD / 255.0, "Blue component") 75 | XCTAssertEqual(alpha, 0.1, "Alpha component") 76 | } 77 | 78 | func testCGColor() { 79 | let layer = CALayer() 80 | layer.shadowColor = UIColor(0xFFEEDD).cgColor 81 | 82 | let components = layer.shadowColor?.components 83 | XCTAssertEqual(components?[0], 0xFF / 255.0, "Red component") 84 | XCTAssertEqual(components?[1], 0xEE / 255.0, "Green component") 85 | XCTAssertEqual(components?[2], 0xDD / 255.0, "Blue component") 86 | XCTAssertEqual(components?[3], 0xFF / 255.0, "Alpha component") 87 | 88 | layer.backgroundColor = UIColor(0x223344).alpha(0.5).cgColor 89 | 90 | let components2 = layer.backgroundColor?.components 91 | XCTAssertEqual(components2?[0], 0x22 / 255.0, "Red component") 92 | XCTAssertEqual(components2?[1], 0x33 / 255.0, "Green component") 93 | XCTAssertEqual(components2?[2], 0x44 / 255.0, "Blue component") 94 | XCTAssertEqual(components2?[3], 0.5, "Alpha component") 95 | } 96 | 97 | func testColorMixing() { 98 | var color: UIColor = UIColor(0x3377FF).alpha(0.5).mix(with: UIColor(0x111111).alpha(0.3), amount: 0.5) 99 | 100 | var red: CGFloat = 0 101 | var green: CGFloat = 0 102 | var blue: CGFloat = 0 103 | var alpha: CGFloat = 0 104 | 105 | color.getRed(&red, green: &green, blue: &blue, alpha: &alpha) 106 | 107 | XCTAssertEqual(red, 0x22 / 255.0, accuracy: 0.0001, "Red component") 108 | XCTAssertEqual(green, 0x44 / 255.0, accuracy: 0.0001, "Green component") 109 | XCTAssertEqual(blue, 0x88 / 255.0, accuracy: 0.0001, "Blue component") 110 | XCTAssertEqual(alpha, 0.4, "Alpha component") 111 | 112 | 113 | color = UIColor(0x000000).alpha(0).mix(with: UIColor(0xFFFFFF).alpha(1.0), amount: (1/15)) 114 | color.getRed(&red, green: &green, blue: &blue, alpha: &alpha) 115 | 116 | XCTAssertEqual(floor(red * 255), 0x11, "Red component") 117 | XCTAssertEqual(floor(green * 255), 0x11, "Green component") 118 | XCTAssertEqual(floor(blue * 255), 0x11, "Blue component") 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /HexColorTests/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 | -------------------------------------------------------------------------------- /HxColor.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'HxColor' 3 | s.version = '4.0.0' 4 | s.license = 'MIT' 5 | s.summary = 'HexColor is a simple extension that lets you initialize UIColors the way they were meant to be initialized: With hex integer values.' 6 | s.homepage = 'https://github.com/artman/HexColor' 7 | s.social_media_url = 'http://twitter.com/artman' 8 | s.authors = { 'Tuomas Artman' => 'tuomas@artman.fi' } 9 | s.source = { :git => 'https://github.com/artman/HexColor.git', :tag => s.version } 10 | 11 | s.ios.deployment_target = '8.0' 12 | s.tvos.deployment_target = '9.0' 13 | s.watchos.deployment_target = '2.0' 14 | 15 | s.source_files = 'HexColor/*.swift' 16 | 17 | s.requires_arc = true 18 | end 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Tuomas Artman 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 all 13 | 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 THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HexColor 2 | [![Build Status](https://travis-ci.org/artman/HexColor.svg)](https://travis-ci.org/artman/HexColor) 3 | [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/HxColor.svg)](https://cocoapods.org/pods/HxColor) 4 | [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 5 | ![License](https://img.shields.io/cocoapods/l/HxColor.svg?style=flat&color=gray) 6 | ![Platform](https://img.shields.io/cocoapods/p/HxColor.svg?style=flat) 7 | [![Twitter](https://img.shields.io/badge/twitter-@artman-blue.svg?style=flat)](http://twitter.com/artman) 8 | 9 | HexColor is a simple extension that lets you initialize UIColors the way they were meant to be initialized: With hex integer values. 10 | 11 | ## Requirements 12 | 13 | - iOS 7.0 / watchOS 2.0 / tvOS 10.0 14 | - Xcode 9.0 (Swift 4.0) 15 | 16 | ## Installation 17 | 18 | To use HexColor with a project targeting iOS 7, simply copy `HexColor.swift` into your project. 19 | 20 | ### CocoaPods 21 | 22 | To integrate HexColor into your project add the following to your `Podfile`: 23 | 24 | ```ruby 25 | platform :ios, '8.0' 26 | use_frameworks! 27 | 28 | pod 'HxColor', '~> 4.0' 29 | ``` 30 | 31 | ### Carthage 32 | 33 | To integrate Signals into your project using Carthage add the following to your `Cartfile`: 34 | 35 | ```ruby 36 | github "artman/HexColor" ~> 4.0 37 | ``` 38 | 39 | ## Quick start 40 | 41 | ```Swift 42 | myLabel.textColor = UIColor(0xFFFFFF) // Let there be white 43 | myView.backgroundColor = UIColor(0x0f126f) // Deep blue 44 | 45 | // Yay, finally you can stop to use this crap: 46 | // UIColor.colorWithRed(0x0f/255.0, green: 0x12/255.0, blue: 0x65/255.0, 1.0) 47 | ``` 48 | 49 | Need colors with alpha? No worries: 50 | 51 | ```Swift 52 | myLabel.textColor = UIColor(0xFF0000).alpha(0.5) // Red with 50% opacity 53 | myLabel.textColor = UIColor(0xFF0000, alpha: 0.5) // Another way to do this 54 | ``` 55 | 56 | You can also mix two colors together easily: 57 | 58 | ```Swift 59 | myLabel.textColor = UIColor(0x3377FF).mix(with: 0xFF2222, amount: 0.25) 60 | ``` 61 | 62 | ## Contribute 63 | 64 | To contribute, just fork, branch & send a pull request. To get in touch, hit me up on Twitter [@artman](http://twitter.com/artman) 65 | 66 | ## License 67 | 68 | HexColor is released under an MIT license. See the LICENSE file for more information 69 | --------------------------------------------------------------------------------