1+ # flutter_brand_palettes
2+
13<img
24src="https://user-images.githubusercontent.com/24878574/119202536-61caa380-ba67-11eb-8f29-1bfa92f28143.png "
35alt="EO-Color logo" width="176" height="82"/>
@@ -13,25 +15,9 @@ Rultor.com](https://www.rultor.com/b/dartoos-dev/flutter_brand_palettes)](https:
1315
1416[ ![ build] ( https://github.com/dartoos-dev/flutter_brand_palettes/actions/workflows/build.yml/badge.svg )] ( https://github.com/dartoos-dev/flutter_brand_palettes/actions/ )
1517[ ![ 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 )
16- ![ CodeFactor Grade] ( https://img.shields.io/codefactor/grade/github/rafamizes/flutter_brand_palettes )
17- [ ![ 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 )
18+ [ ![ CodeFactor Grade] ( https://img.shields.io/codefactor/grade/github/rafamizes/flutter_brand_palettes )] ( https://www.codefactor.io/repository/github/rafamizes/flutter_brand_palettes )
1819[ ![ style: lint] ( https://img.shields.io/badge/style-lint-4BC0F5.svg )] ( https://pub.dev/packages/lint )
19-
20- ## Overview
21-
22- ** Flutter Brand Palettes** is a collection of declarative and object-oriented
23- classes for the color palettes of popular brands and companies.
24-
25- For example, to get the Instagram colors as a ` List<Color> ` object,
26- simply declare ` InstagramGrad().colors ` — the 'Grad' suffix is short for
27- _ Gradient_ .
28-
29- To get a single color, declare ` Instagram.royalBlue().color ` for Instagram
30- royal blue; ` Instagram.yellow().color ` for Instagram yellow, and so on.
31-
32- In addition, each class is well-documented and fully unit-tested — this package
33- has achieved 100% code coverage and goes through a CI pipeline with rigorous
34- quality gates.
20+ [ ![ 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 )
3521
3622## Contents
3723
@@ -41,57 +27,82 @@ quality gates.
4127- [ Color Gradient in action] ( #color-gradient-in-action )
4228- [ Color Gradients] ( #color-palettes-in-action )
4329- [ Demo application] ( #demo-application )
44- - [ I need the 'X' color palettes] ( #i-need-the-x-brand- color-palette )
30+ - [ I need the 'X' color palettes] ( #i-need-the-x-color-palette )
4531- [ List of Color Palettes] ( #list-of-color-palettes-a-z )
4632- [ References] ( #hex-color-values-references )
4733
34+ ## Overview
35+
36+ ** Flutter Brand Palettes** is a collection of declarative, object-oriented
37+ classes for the color palettes of popular brands and companies.
38+
39+ For example, to retrieve Instagram's colors at once, as a ` List<Color> ` object,
40+ simply declare ` InstagramGrad().colors ` — the 'Grad' suffix is short for
41+ _ Gradient_ .
42+
43+ For a single color, simply select it from the brand-related color palette class.
44+ For example, the command ` Instagram.royalBlue() ` retrieves the royal blue color
45+ from the Instagram color palette; ` Instagram.yellow() ` retrieves the yellow
46+ color; and so on.
47+
48+ In addition, all classes are well-documented and fully unit-tested, passing
49+ through a CI pipeline with rigorous quality ports.
50+
4851## Getting Started
4952
5053Instead of a constant integer value, a color is represented by a named
5154constructor of its corresponding brand class. In this way, the source code
52- becomes more object-oriented, readable and maintainable. For instance, the
53- command ` Instagram.red().color ` retrieves the Instagram red color _ #FD1D1D_ ;
54- ` Google.red().color ` , the Google red _ #DB4437_ ; ` Facebook.blue().color ` ,
55- the Facebook blue _ #4267B2_ , and so on.
55+ becomes more object-oriented, readable and maintainable.
56+
57+ For example, the command ` Facebook.blue().color ` returns Facebook's blue color
58+ _ #4267B2_ . Likewise, the command ` Instagram.red().color ` returns Instagram's red
59+ color _ #FD1D1D_ ; ` Google.red().color ` , Google's red color _ #DB4437_ .
5660
5761## Color Palettes in Action
5862
63+ The code bellow builds a container widget whose background color is Facebook
64+ blue.
65+
5966``` dart
6067import 'package:brand_colors/flutter_brand_colors.dart';
6168import 'package:flutter/material.dart';
6269
6370class FacebookIsh extends StatelessWidget {
6471
72+ const _blue = Facebook.blue();
73+
6574 @override
66- Widget build(BuildContext context) {
67- return Container(
68- color: Facebook.blue().color,
69- );
70- }
75+ Widget build(BuildContext context) => Container(color: _blue.color);
7176}
7277```
7378
7479## Color Gradient in Action
7580
81+ The code below builds a rectangle filled with the Google logo gradient.
82+
7683``` dart
7784
7885/// Rectangle filled with Google logo color gradient.
7986class Googleish extends StatelessWidget {
8087
88+ static final _googleGrad = const GoogleGrad().colors;
89+
8190 @override
8291 Widget build(BuildContext context) {
8392 return Container(
84- height: kToolbarHeight / 2,
8593 decoration: BoxDecoration(
86- gradient: LinearGradient(
87- colors: GoogleGrad().colors,
88- ),
94+ gradient: LinearGradient(colors: _googleGrad),
8995 ),
9096 );
9197 }
98+ }
9299
93100```
94101
102+ The result of the previous code in full screen
103+
104+ ![ google_grad_full_screen] ( https://user-images.githubusercontent.com/24878574/126880793-2e9170a1-3eaa-4770-9e89-410c7e123503.png )
105+
95106## Demo application
96107
97108The demo application provides a fully working example, focused on demonstrating
@@ -111,15 +122,17 @@ This should launch the demo application on Chrome in debug mode.
111122
112123![ Demo-App] ( https://user-images.githubusercontent.com/24878574/122657224-de6ca280-d137-11eb-9eb1-fc5169872d64.png )
113124
114- ## I need the 'X' brand color palette
125+ ## I need the 'X' color palette
115126
116- Do you need any brand that has not yet been implemented?
127+ Do you need a color palette that has not been implemented yet ?
117128
118- It doesn't matter the size and relevance of the company, not even if it's a
119- tech company.
129+ It doesn't matter the size and relevance of the company, not even if it's a tech
130+ company.
120131
121- Just open an [ issue] ( https://github.com/dartoos-dev/flutter_brand_palettes/issues )
122- and enter the brand or company name — the colors will be implemented as soon as possible.
132+ Just open an
133+ [ issue] ( https://github.com/dartoos-dev/flutter_brand_palettes/issues ) and enter
134+ the brand or company name; the color palette will be implemented as soon as
135+ possible.
123136
124137## List of Color Palettes (A-Z)
125138
0 commit comments