You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 14, 2018. It is now read-only.
I have some code that allows me to modify a ColorInt as an HSV color and returns a ColorInt.
Basically I can do something like this:
textView.textColor =Color.RED.hsv { h +=50; s *=0.5; v =0.25 }
I think it fits KTX because it leverages Kotlin to abstract some boring stuff about working with HSV (conversion to and from the FloatArray), and uses existing framework Util methods to do the work.
I have some code that allows me to modify a
ColorInt
as an HSV color and returns aColorInt
.Basically I can do something like this:
I think it fits KTX because it leverages Kotlin to abstract some boring stuff about working with HSV (conversion to and from the
FloatArray
), and uses existing framework Util methods to do the work.It's a small thing, I have it in this gist.
What do you think?
The text was updated successfully, but these errors were encountered: