-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
1,009 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
## Version 0.1.0 | ||
## Version 0.2.0 | ||
### Features | ||
* HSB support | ||
|
||
## Version 0.1.0 | ||
### Features | ||
* Initial library setup | ||
* RGB support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
**CLASS** | ||
|
||
# `HSBAColor` | ||
|
||
```swift | ||
public class HSBAColor: NSObject, NSCopying, Codable | ||
``` | ||
|
||
> A model class representing HSBA colors. The hue component can hold values between 0.0 and 360.0 while the saturation and brightnes values have a maximum value of 100.0. | ||
|
||
## Methods | ||
### `init(hue:saturation:brightness:alpha:)` | ||
|
||
```swift | ||
public init(hue: CGFloat, saturation: CGFloat, brightness: CGFloat, alpha: CGFloat) | ||
``` | ||
|
||
> Creates a HSBAColor instance. | ||
> | ||
> - Parameter: | ||
> - hue: The hue component. | ||
> - saturation: The saturation component. | ||
> - brightness: The brightness component. | ||
> - alpha: The opacity component. | ||
|
||
### `copy(with:)` | ||
|
||
```swift | ||
public func copy(with _: NSZone? = nil) -> Any | ||
``` | ||
|
||
> Creates a copy of the HSBAColor instance. | ||
> | ||
> - Returns: A copy of the HSBAColor instance. | ||
|
||
### `isEqual(_:)` | ||
|
||
```swift | ||
public override func isEqual(_ object: Any?) -> Bool | ||
``` | ||
|
||
> Compares two HSBAColor instances with each other. | ||
> | ||
> - Parameter object: The HSBAColor to compare with. | ||
> | ||
> - Returns: 'true' if the instance is equal to the other HSBAColor instance, otherwise 'false''. | ||
|
||
#### Parameters | ||
|
||
| Name | Description | | ||
| ---- | ----------- | | ||
| object | The HSBAColor to compare with. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,11 @@ case rgb | |
``` | ||
|
||
> The RGB color model. | ||
|
||
### `hsb` | ||
|
||
```swift | ||
case hsb | ||
``` | ||
|
||
> The HSB color model. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
**EXTENSION** | ||
|
||
# `HSBAColor` | ||
|
||
## Properties | ||
### `uiColor` | ||
|
||
```swift | ||
public var uiColor: UIColor | ||
``` | ||
|
||
> The UIColor representation of the HSBAColor. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.