-
-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allows getting the hue, saturation and brightness components of UIColor. #51
Conversation
Source/iOS/UIColor+Hue.swift
Outdated
@@ -173,6 +173,30 @@ public extension UIColor { | |||
return a | |||
} | |||
} | |||
|
|||
var hueComponent : CGFloat { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the space before the :
to match our convention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's funny because I never leave that space but left it following the coding convention on the same extension you used for redComponent.
Source/iOS/UIColor+Hue.swift
Outdated
@@ -173,6 +173,30 @@ public extension UIColor { | |||
return a | |||
} | |||
} | |||
|
|||
var hueComponent : CGFloat { | |||
get { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is computed property, I don't think you need get
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same as before, I know you don't need the get, but left it following the coding convention on the same extension you used for redComponent.
Source/iOS/UIColor+Hue.swift
Outdated
} | ||
} | ||
|
||
var saturationComponent : CGFloat { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use 2 spaces indentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think my Xcode defaults to 4 spaces indentation. I'll check.
@boherna Hi, many thanks for the PR. I made some comments |
How does it look now? As a bonus I fixed also the redComponent, greenComponent and blueComponent to follow the requested coding style. |
@boherna Looking good to me. Thanks again for the PR 🚀 |
No description provided.