Skip to content

Commit 6ea0569

Browse files
committed
(#57): drop material design colors; depend on eo_color
1 parent 5e797eb commit 6ea0569

File tree

171 files changed

+106
-4750
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+106
-4750
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Changed - BREAKING CHANGES
9+
- Huge refactoring - [57](https://github.com/dartoos-dev/flutter_brand_palettes/issues/57)
10+
- Drop support for the Material Design colors; use them via [eo_color](https://pub.dev/packages/eo_color).
11+
- Drop support for the Palette and Swatch interfaces, as well as for the
12+
PaletteRGB and SwtchBase abstract classes; from now on, theses classes are
13+
provided by the [eo_color](https://pub.dev/packages/eo_color) package.
14+
- Use the [eo_color](https://pub.dev/packages/eo_color) color package as a
15+
base framework.
16+
17+
### Added
18+
- Googleish color palette as the project logo.
819

920
## [0.2.7+1] - 2021-05-10
1021
### Fixed

README.md

Lines changed: 30 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
# Flutter Brand Palettes
1+
<img
2+
src="https://user-images.githubusercontent.com/24878574/119202536-61caa380-ba67-11eb-8f29-1bfa92f28143.png"
3+
alt="EO-Color logo" width="207" height="96"/>
24

35
[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)
4-
[![DevOps By Rultor.com](https://www.rultor.com/b/rafamizes/flutter_brand_palettes)](https://www.rultor.com/p/rafamizes/flutter_brand_palettes)
6+
[![DevOps By Rultor.com](https://www.rultor.com/b/dartoos-dev/flutter_brand_palettes)](https://www.rultor.com/p/dartoos-dev/flutter_brand_palettes)
57

68
[![pub](https://img.shields.io/pub/v/flutter_brand_palettes)](https://pub.dev/packages/flutter_brand_palettes)
7-
[![license](https://img.shields.io/badge/license-mit-green.svg)](https://github.com/rafamizes/flutter_brand_palettes/blob/main/LICENSE)
9+
[![license](https://img.shields.io/badge/license-mit-green.svg)](https://github.com/dartoos-dev/flutter_brand_palettes/blob/main/LICENSE)
810
[![style: lint](https://img.shields.io/badge/style-lint-4BC0F5.svg)](https://pub.dev/packages/lint)
9-
[![PDD status](https://www.0pdd.com/svg?name=rafamizes/flutter_brand_palettes)](https://www.0pdd.com/p?name=rafamizes/flutter_brand_palettes)
10-
[![build](https://github.com/rafamizes/flutter_brand_palettes/actions/workflows/build.yml/badge.svg)](https://github.com/rafamizes/flutter_brand_palettes/actions/)
11-
[![codecov](https://codecov.io/gh/rafamizes/flutter_brand_palettes/branch/master/graph/badge.svg)](https://codecov.io/gh/rafamizes/flutter_brand_palettes)
12-
[![Hits-of-Code](https://hitsofcode.com/github/rafamizes/flutter_brand_palettes?branch=master)](https://hitsofcode.com/github/rafamizes/flutter_brand_palettes/view?branch=master)
11+
[![PDD status](https://www.0pdd.com/svg?name=dartoos-dev/flutter_brand_palettes)](https://www.0pdd.com/p?name=dartoos-dev/flutter_brand_palettes)
12+
[![build](https://github.com/dartoos-dev/flutter_brand_palettes/actions/workflows/build.yml/badge.svg)](https://github.com/dartoos-dev/flutter_brand_palettes/actions/)
13+
[![codecov](https://codecov.io/gh/dartoos-dev/flutter_brand_palettes/branch/master/graph/badge.svg?token=Hvpu48mfx1)](https://codecov.io/gh/dartoos-dev/flutter_brand_palettes)
14+
[![Hits-of-Code](https://hitsofcode.com/github/dartoos-dev/flutter_brand_palettes?branch=master)](https://hitsofcode.com/github/dartoos-dev/flutter_brand_palettes/view?branch=master)
1315

14-
Stop searching the internet for color hex codes! Stop wondering whether an
15-
obscure command like `Grey.colors[200]` generates a light, medium or dark shade
16-
of grey. (By the way, why '200' and not, say, '130' or '440'?)
16+
#### Stop searching the internet for color hex codes!
1717

18-
This package is a collection of declarative and object-oriented classes for the
19-
official color palettes of popular brands and companies, as well as for the
20-
[Material Design](https://material.io/design/color/) standard.
18+
**Flutter Brand Palettes** is a collection of declarative and object-oriented
19+
classes for the color palettes and official logos of popular brands and
20+
companies.
2121

2222
## Getting Started
2323

@@ -28,29 +28,7 @@ command `Instagram.red().color` retrieves the Instagram's red color #FD1D1D;
2828
`Google.red().color`, Google's red #DB4437; `Facebook.blue().color`, Facebook's
2929
blue #4267B2; and so on.
3030

31-
### Material Design color classes
32-
33-
These are classes whose names are the colors they represent, such as "Grey". For
34-
example: `Grey()` represents the primary grey color, equivalent to the Flutter's
35-
cryptic `Colors.grey.shade500`; `Grey.light()` ≡ `Colors.grey.shade200`;
36-
`Grey.veryDark()` ≡ `Colors.grey.shade900`; and so on.
37-
38-
### Color Swatches - Several colors at once
39-
40-
Each color swatch class is a collection of related colors, such as the colors of
41-
the rainbow, shades of grey, the colors of the gradient of a logo, etc.
42-
43-
#### 'Ish' classes
44-
45-
Any class whose name is a color with the 'ish' suffix represents some shades
46-
thereof. The `Greyish` class is an example for 10 shades of grey. The command
47-
`Greyish().colors` retrieves an `Iterable<Color>` of 10 shades of grey; the
48-
greater the color index, the darker the grey.
49-
50-
For more details: [api
51-
reference](https://pub.dev/documentation/flutter_brand_palettes/latest/flutter_brand_palettes/flutter_brand_palettes-library.html).
52-
53-
## Usage example
31+
## Color Palettes in action
5432

5533
```dart
5634
import 'package:brand_colors/flutter_brand_colors.dart';
@@ -67,39 +45,25 @@ class FacebookIsh extends StatelessWidget {
6745
}
6846
```
6947

48+
### Showcase application
49+
50+
To run the showcase application:
51+
52+
```shell
53+
cd example/
54+
flutter run -d chrome
55+
56+
```
57+
58+
This should start the showcase application in Chrome browser.
59+
60+
![Brand-Palettes-Showcase](https://user-images.githubusercontent.com/24878574/119206037-6a73a780-ba70-11eb-8194-384ff5c22d20.png)
61+
7062
### Do you need any brand that has not yet been implemented?
7163

7264
Just open an
73-
[issue](https://github.com/rafamizes/flutter_brand_palettes/issues), enter the
74-
brand name and a reference link for the (hexadecimal) values of the colors. The
75-
brand colors will be implemented as soon as possible.
76-
77-
### Color Palettes Classes
78-
79-
- Blue, BlueAccent, LightBlue, LightBlueAccent, Cyan, CyanAccent, Indigo,
80-
IndigoAccent.
81-
- Green, GreenAccent, LightGreen, LightGreenAccent, Lime, LimeAccent,
82-
Teal,TealAccent.
83-
- Grey, BlueGrey, Brown.
84-
- Red, RedAccent, Pink, PinkAccent, Purple, PurpleAccent, DeepPurple, DeepPurpleAccent.
85-
- Yellow, YellowAccent, Amber, AmberAccent, Orange, OrangeAccent, DeepOrange,
86-
- Black, Black.opacity87, Black.opacity54, Black.opacity45, Black.opacity38,
87-
Black.opacity26, Black.opacity12.
88-
- White, White.opacity70, White.opacity60, White.opacity54, White.opacity38,
89-
White.opacity30, White.opacity24, White.opacity12, White.opacity10.
90-
- Transparent.
91-
92-
### Color Swatches
93-
94-
- Bluish, BluishLight, Cyanish, Indigoish.
95-
- Greenish, GreenishLight, Limish, Tealish.
96-
- Greyish, BluishGrey, Brownish.
97-
- Reddish, Pinkish, Purplish, PurplishDeep.
98-
- Yellowish, Amberish, Orangish, OrangishDeep.
99-
- Primaries (primary colors, excluding grey).
100-
101-
See also: [material design's color
102-
palette](https://material.io/archive/guidelines/style/color.html#color-color-palette).
65+
[issue](https://github.com/dartoos-dev/flutter_brand_palettes/issues), enter the
66+
brand name and a reference link for the colors.
10367

10468
### Brand Palettes Classes (A-Z)
10569

example/lib/main.dart

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:flutter/material.dart';
2-
import 'package:flutter_brand_palettes/flutter_brand_palettes.dart';
2+
import 'package:flutter_brand_palettes/palettes.dart';
3+
import 'package:eo_color/eo_color.dart';
34

45
void main() {
56
runApp(MyApp());
@@ -11,7 +12,7 @@ class MyApp extends StatelessWidget {
1112
return const MaterialApp(
1213
debugShowCheckedModeBanner: false,
1314
title: 'Flutter Brand Palette Demo',
14-
home: InstagramPalettePage(title: 'Instagram Palette Demo'),
15+
home: InstagramPalettePage(title: 'Instagram Color Palette'),
1516
);
1617
}
1718
}
@@ -133,7 +134,10 @@ class _ColorItem extends StatelessWidget {
133134
child: Text(
134135
_label,
135136
textAlign: TextAlign.center,
136-
style: TextStyle(color: _normal()), // or _normal.color
137+
style: TextStyle(
138+
color: _normal(), // or _normal.color
139+
fontWeight: FontWeight.bold,
140+
),
137141
),
138142
),
139143
Expanded(

example/pubspec.lock

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.5.0"
10+
version: "2.6.1"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
@@ -43,6 +43,13 @@ packages:
4343
url: "https://pub.dartlang.org"
4444
source: hosted
4545
version: "1.15.0"
46+
eo_color:
47+
dependency: "direct main"
48+
description:
49+
name: eo_color
50+
url: "https://pub.dartlang.org"
51+
source: hosted
52+
version: "0.0.9"
4653
fake_async:
4754
dependency: transitive
4855
description:
@@ -61,7 +68,7 @@ packages:
6168
path: ".."
6269
relative: true
6370
source: path
64-
version: "0.2.6+2"
71+
version: "0.2.7+1"
6572
flutter_test:
6673
dependency: "direct dev"
6774
description: flutter
@@ -158,3 +165,4 @@ packages:
158165
version: "2.1.0"
159166
sdks:
160167
dart: ">=2.12.0 <3.0.0"
168+
flutter: ">=1.17.0"

example/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ environment:
99
sdk: ">=2.12.0 <3.0.0"
1010

1111
dependencies:
12+
eo_color: ^0.0.9
1213
flutter:
1314
sdk: flutter
1415

lib/colors.dart

Lines changed: 0 additions & 38 deletions
This file was deleted.

lib/flutter_brand_palettes.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
export 'brands.dart';
2-
export 'colors.dart';
3-
export 'src/palette.dart';
4-
export 'src/palette_rgb.dart';
5-
export 'swatches.dart';
1+
export 'palettes.dart';
File renamed without changes.

lib/src/brands/amazon.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '../palette_rgb.dart';
1+
import 'package:eo_color/eo_color.dart';
22

33
/// Amazon's official brand colors:
44
///

lib/src/brands/american_express.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '../palette_rgb.dart';
1+
import 'package:eo_color/eo_color.dart';
22

33
/// American Express' official brand colors:
44
///

0 commit comments

Comments
 (0)