-
Notifications
You must be signed in to change notification settings - Fork 23
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
Making utility as Color Extension shortcuts #3
Comments
Maybe make a pull request to add this. |
@Skquark if you make a PR I will merge it |
Alright, took the time to integrate it in and update the documents, and it makes this nice 2 year old utility feel brand new again.. Looking for more excuses to use it in my app where I've made my theme fully skinnable, and this lets me get more creative with the custom styling. Fun stuff... Only other feature I can think to request is more color harmonizing utilities like the color wheels on color.adobe... Could be easy to make the Analogous, Triad, Compound etc using the .spin with the right degrees, but haven't played yet. Thank. |
Thank you @Skquark , I will upload it to pub in the next day. |
@mendieta Guessing you've been busy, is there any chance of getting the upload to pub soon? |
Needed this tool, tried a few of the other dart color addons and this did the trick. I got inspired with the new extension method in Dart that made it really easy to extend the Color object with all of your functions, and it's so nice to work with it. Wanted to share my code, it's so simple and pretty I'd recommend adding it as color_extensions.dart:
So now I can call it like Colors.yellow.shade(20), Colors.blue.shade700.compliment, Colors.red.darken(80), Colors.green.mix(Colors.blue.spin(33), 30), and all the other TinyColor features and make it look built into Flutter's Color widget. The only requirement for the extension on usage is setting environment in pubspec to sdk: ">=2.6.0 <3.0.0"
Thanks, hope other people find this useful, it makes intuitive sense, I'm glad they added this ability to the language..
The text was updated successfully, but these errors were encountered: