Skip to content

Commit

Permalink
Merge tag '1.1.3' into develop
Browse files Browse the repository at this point in the history
1.1.3
  • Loading branch information
chrwendt committed Feb 11, 2020
2 parents ae1f210 + 7028df6 commit edc2ea5
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 31 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Version 1.1.3

### Bugfixes
* [Fix naming collisions with SwiftUI](https://github.com/chrs1885/Capable/pull/51)

## Version 1.1.2

### Bugfixes
Expand Down
2 changes: 1 addition & 1 deletion Capable.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Capable'
s.version = '1.1.2'
s.version = '1.1.3'
s.summary = 'Keep track of accessibility settings, leverage high contrast colors, and use scalable fonts to enable users with disabilities to use your app.'

s.description = <<-DESC
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ This Reference Documentation has been generated with
## Extensions

- [Capable](extensions/Capable.md)
- [Color](extensions/Color.md)
- [ConformanceLevel](extensions/ConformanceLevel.md)
- [TypeColor](extensions/TypeColor.md)
- [UIFont](extensions/UIFont.md)
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
**EXTENSION**

# `Color`
# `TypeColor`

## Methods
### `getContrastRatio(forTextColor:onBackgroundColor:)`

```swift
public class func getContrastRatio(forTextColor textColor: Color, onBackgroundColor backgroundColor: Color) -> CGFloat?
public class func getContrastRatio(forTextColor textColor: TypeColor, onBackgroundColor backgroundColor: TypeColor) -> CGFloat?
```

> Calculates the color ratio for a text color on a background color.
Expand All @@ -31,7 +31,7 @@ public class func getContrastRatio(forTextColor textColor: Color, onBackgroundCo
### `getTextColor(onBackgroundColor:)`

```swift
public class func getTextColor(onBackgroundColor backgroundColor: Color) -> Color?
public class func getTextColor(onBackgroundColor backgroundColor: TypeColor) -> TypeColor?
```

> Returns the text color with the highest contrast (black or white) for a given background color.
Expand All @@ -54,7 +54,7 @@ public class func getTextColor(onBackgroundColor backgroundColor: Color) -> Colo
### `getTextColor(fromColors:withFont:onBackgroundColor:conformanceLevel:)`

```swift
public class func getTextColor(fromColors colors: [Color], withFont font: Font, onBackgroundColor backgroundColor: Color, conformanceLevel: ConformanceLevel = .AA) -> Color?
public class func getTextColor(fromColors colors: [TypeColor], withFont font: TypeFont, onBackgroundColor backgroundColor: TypeColor, conformanceLevel: ConformanceLevel = .AA) -> TypeColor?
```

> Calculates the contrast ratio of a given list of text colors and a background color. The first color that conforms to the conformance level defined gets returned. The default conformance level is .AA.
Expand Down Expand Up @@ -83,7 +83,7 @@ public class func getTextColor(fromColors colors: [Color], withFont font: Font,
### `getTextColor(onBackgroundImage:imageArea:)`

```swift
public class func getTextColor(onBackgroundImage image: Image, imageArea: ImageArea = .full) -> Color?
public class func getTextColor(onBackgroundImage image: TypeImage, imageArea: ImageArea = .full) -> TypeColor?
```

> Returns the text color with the highest contrast (black or white) for a specific area of given background image.
Expand All @@ -101,7 +101,7 @@ public class func getTextColor(onBackgroundImage image: Image, imageArea: ImageA
### `getTextColor(fromColors:withFont:onBackgroundImage:imageArea:conformanceLevel:)`

```swift
public class func getTextColor(fromColors colors: [Color], withFont font: Font, onBackgroundImage image: Image, imageArea: ImageArea = .full, conformanceLevel: ConformanceLevel = .AA) -> Color?
public class func getTextColor(fromColors colors: [TypeColor], withFont font: TypeFont, onBackgroundImage image: TypeImage, imageArea: ImageArea = .full, conformanceLevel: ConformanceLevel = .AA) -> TypeColor?
```

> Calculates the contrast ratio of a given list of text colors and a specific area of given background image. The first color that conforms to the conformance level defined gets returned. The default conformance level is .AA.
Expand All @@ -122,7 +122,7 @@ public class func getTextColor(fromColors colors: [Color], withFont font: Font,
### `getBackgroundColor(forTextColor:)`

```swift
public class func getBackgroundColor(forTextColor textColor: Color) -> Color?
public class func getBackgroundColor(forTextColor textColor: TypeColor) -> TypeColor?
```

> Returns the background color with the highest contrast (black or white) for a given text color.
Expand All @@ -145,7 +145,7 @@ public class func getBackgroundColor(forTextColor textColor: Color) -> Color?
### `getBackgroundColor(fromColors:forTextColor:withFont:conformanceLevel:)`

```swift
public class func getBackgroundColor(fromColors colors: [Color], forTextColor textColor: Color, withFont font: Font, conformanceLevel: ConformanceLevel = .AA) -> Color?
public class func getBackgroundColor(fromColors colors: [TypeColor], forTextColor textColor: TypeColor, withFont font: TypeFont, conformanceLevel: ConformanceLevel = .AA) -> TypeColor?
```

> Calculates the contrast ratio of a given list of background colors and a text color. The first color that conforms to the conformance level defined gets returned. The default conformance level is .AA.
Expand Down
16 changes: 8 additions & 8 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = "Brand Assets";
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = V7PYJ2FTTJ;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "$(SRCROOT)/Source/tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "de.christoph-wendt.capable.Example-tvOS";
Expand All @@ -1698,7 +1698,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = "Brand Assets";
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = V7PYJ2FTTJ;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "$(SRCROOT)/Source/tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "de.christoph-wendt.capable.Example-tvOS";
Expand Down Expand Up @@ -1756,7 +1756,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = V7PYJ2FTTJ;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "$(SRCROOT)/Source/watchOS/Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "de.christoph-wendt.capable.Example-iOS.watchkitapp.watchkitextension";
Expand All @@ -1775,7 +1775,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = V7PYJ2FTTJ;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "$(SRCROOT)/Source/watchOS/Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "de.christoph-wendt.capable.Example-iOS.watchkitapp.watchkitextension";
Expand All @@ -1794,7 +1794,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-watchOS";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = V7PYJ2FTTJ;
DEVELOPMENT_TEAM = "";
IBSC_MODULE = Example_watchOS_Extension;
INFOPLIST_FILE = "$(SRCROOT)/Source/watchOS/Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "de.christoph-wendt.capable.Example-iOS.watchkitapp";
Expand All @@ -1813,7 +1813,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-watchOS";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = V7PYJ2FTTJ;
DEVELOPMENT_TEAM = "";
IBSC_MODULE = Example_watchOS_Extension;
INFOPLIST_FILE = "$(SRCROOT)/Source/watchOS/Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "de.christoph-wendt.capable.Example-iOS.watchkitapp";
Expand Down Expand Up @@ -1946,7 +1946,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-iOS";
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = V7PYJ2FTTJ;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "$(SRCROOT)/Source/iOS/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand All @@ -1964,7 +1964,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-iOS";
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = V7PYJ2FTTJ;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = "$(SRCROOT)/Source/iOS/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand Down
16 changes: 8 additions & 8 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
PODS:
- Capable (1.1.2):
- Capable/Colors (= 1.1.2)
- Capable/Features (= 1.1.2)
- Capable/Fonts (= 1.1.2)
- Capable/Colors (1.1.2)
- Capable/Features (1.1.2)
- Capable/Fonts (1.1.2)
- Capable (1.1.3):
- Capable/Colors (= 1.1.3)
- Capable/Features (= 1.1.3)
- Capable/Fonts (= 1.1.3)
- Capable/Colors (1.1.3)
- Capable/Features (1.1.3)
- Capable/Fonts (1.1.3)
- Nimble (8.0.4)
- Quick (2.2.0)
- SheetyColors (1.0.1):
Expand All @@ -28,7 +28,7 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
Capable: 68f8213fb81f2e4667bcc06449adc6ade1926017
Capable: 1568ec5d4dde7daf0925ea327463ee333c9f7341
Nimble: 18d5360282923225d62b09d781f63abc1a0111fc
Quick: 7fb19e13be07b5dfb3b90d4f9824c855a11af40e
SheetyColors: ae8c3a5d04d310e8e2d08e4aa0bd543519d02252
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed Images/features_example_app.png
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ github "chrs1885/Capable"

```ruby
dependencies: [
.package(url: "https://github.com/chrs1885/Capable.git", from: "1.1.2")
.package(url: "https://github.com/chrs1885/Capable.git", from: "1.1.3")
]
```

Expand Down

0 comments on commit edc2ea5

Please sign in to comment.