Skip to content

Commit

Permalink
Release 0.2.0+4, almost ready for 1.0.0?
Browse files Browse the repository at this point in the history
  • Loading branch information
vincevargadev committed Dec 27, 2021
1 parent 9424431 commit 3241ed8
Show file tree
Hide file tree
Showing 5 changed files with 644 additions and 15 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.2.0+3
## 0.2.0+4

Initial release, set up CI/CD and code coverage, etc.
Between `0.1.0` and `0.2.0+4`, there weren't many code changes. The releases happened to fully test a CI/CD pipeline.

Initial releases, set up release, testing etc in CI/CD and code coverage.

Make README improvements.
Make Docs improvements: links to same colors in named and unnamed classes.
34 changes: 24 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,43 @@ HTML and CSS lets you use around 140 names colors. With this simple Flutter pack
* [Read the source code and **star the repo** on GitHub](https://github.com/dartsidedev/kolors)
* [Open an issue on GitHub](https://github.com/dartsidedev/kolors/issues)
* [See package on `pub.dev`](https://pub.dev/packages/kolors)
* [Read the docs on `pub.dev`](https://pub.dev/documentation/kolors/latest/)
* [Read the docs on `pub.dev`](https://pub.dev/documentation/kolors/latest/)\

## Inspiration

This package is inspired by the [`material` library's `Colors`class](https://api.flutter.dev/flutter/material/Colors-class.html).
I found that class to be very convenient for prototyping applications: no hex codes, just simple, intuitive named colors.

As a developer with many years of web background, I found that I often wanted to reach for the web (HTML and CSS) colors from my Flutter application.

Now, with this package, it's possible to find the right colors for quick prototyping.

## Usage

```dart
import 'package:kolors/kolors.dart';
// If you want to show the colors with their names to your users,
// use the "asMap" that contains the colors names and the colors.
final m = Kolors.asMap();
final entries = m.entries.toList(growable: false);
// Just type "Kolors." and pick a color that you like.
const appBarColor = Kolors.tomato;
const borderColor = Kolors.skyBlue;
// You can use the grouped classes if you know which color's shades
// you are interested in.
const appBarColor = KolorReds.lightSalmon;
const iconColor = KolorGreens.limeGreen;
const fabColor = KolorBlues.skyBlue;
// If you want to show the colors with their names to your users,
// use the "asMap" that contains the colors names and the colors.
final kolorsMap = Kolors.asMap();
final kolorEntries = m.kolorsMap.toList();
// Just the colors as List<Color>
const pinks = KolorPinks.values;
```

TODO: demo app gif
TODO: demo IntelliJ
You can find the example app on [GitHub](https://github.com/dartsidedev/kolors/blob/main/example/lib/main.dart) and on [pub.dev](https://pub.dev/packages/kolors/example).

You can find the example app on GitHub and on pub.dev.
<img src="https://raw.githubusercontent.com/dartsidedev/kolors/main/docs_assets/example_app.gif" alt="Flutter package kolors example app in action" height="600"/>

Please keep in mind that this package has a `dart:ui` dependency (and [therefore runs only with Flutter](https://twitter.com/vincevargadev/status/1471965783463010311)).
Please keep in mind that this package has a `dart:ui` dependency (and [therefore runs only with Flutter](https://twitter.com/vincevargadev/status/1471965783463010311)).
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class MyApp extends StatelessWidget {
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
title: const Text('HTML Colors'),
title: const Text('Kolors'),
backgroundColor: appBarColor,
),
floatingActionButton: FloatingActionButton(
Expand Down

0 comments on commit 3241ed8

Please sign in to comment.