Visitar URL original
Merge pull request #334 from stuartmorgan/import-css-colors · flutter/packages@b891620 · GitHub
Skip to content

Commit b891620

Browse files
Merge pull request #334 from stuartmorgan/import-css-colors
[css_colors] Import from flutter/css_colors
2 parents eff3dba + db481c9 commit b891620

7 files changed

Lines changed: 269 additions & 7 deletions

File tree

‎README.md‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,18 @@ If you wish to contribute a change to any of the existing packages in this repo,
2727
please review our [contribution guide](https://github.com/flutter/packages/blob/master/CONTRIBUTING.md),
2828
and send a [pull request](https://github.com/flutter/packages/pulls).
2929

30-
## Plugins
30+
## Packages
3131

3232
These are the available packages in this repository.
3333

3434
| Plugin | Pub |
3535
|--------|-----|
3636
| [animations](./packages/animations/) | [![pub package](https://img.shields.io/pub/v/animations.svg)](https://pub.dev/packages/animations) |
37-
| [extension_google_sign_in_as_googleapis_auth](./packages/extension_google_sign_in_as_googleapis_auth/) | [![pub package](https://img.shields.io/pub/v/extension_google_sign_in_as_googleapis_auth.svg)](https://pub.dev/packages/extension_google_sign_in_as_googleapis_auth) |
38-
| [fuchsia_ctl](./packages/fuchsia_ctl/) | [![pub package](https://img.shields.io/pub/v/fuchsia_ctl.svg)](https://pub.dev/packages/fuchsia_ctl) |
39-
| [multicast_dns](./packages/multicast_dns/) | [![pub package](https://img.shields.io/pub/v/multicast_dns.svg)](https://pub.dev/packages/multicast_dns) |
40-
| [palette_generator](./packages/palette_generator/) | [![pub package](https://img.shields.io/pub/v/palette_generator.svg)](https://pub.dartlang.org/packages/palette_generator) |
37+
| [css\_colors](./packages/css_colors/) | [![pub package](https://img.shields.io/pub/v/css_colors.svg)](https://pub.dev/packages/css_colors) |
38+
| [extension\_google\_sign\_in\_as\_googleapis\_auth](./packages/extension_google_sign_in_as_googleapis_auth/) | [![pub package](https://img.shields.io/pub/v/extension_google_sign_in_as_googleapis_auth.svg)](https://pub.dev/packages/extension_google_sign_in_as_googleapis_auth) |
39+
| [fuchsia\_ctl](./packages/fuchsia_ctl/) | [![pub package](https://img.shields.io/pub/v/fuchsia_ctl.svg)](https://pub.dev/packages/fuchsia_ctl) |
40+
| [multicast\_dns](./packages/multicast_dns/) | [![pub package](https://img.shields.io/pub/v/multicast_dns.svg)](https://pub.dev/packages/multicast_dns) |
41+
| [palette\_generator](./packages/palette_generator/) | [![pub package](https://img.shields.io/pub/v/palette_generator.svg)](https://pub.dartlang.org/packages/palette_generator) |
4142
| [pigeon](./packages/pigeon/) | [![pub package](https://img.shields.io/pub/v/pigeon.svg)](https://pub.dev/packages/pigeon) |
42-
| [pointer_interceptor](./packages/pointer_interceptor/) | [![pub package](https://img.shields.io/pub/v/pointer_interceptor.svg)](https://pub.dev/packages/pointer_interceptor) |
43-
| [xdg_directories](./packages/xdg_directories/) | [![pub package](https://img.shields.io/pub/v/xdg_directories.svg)](https://pub.dev/packages/xdg_directories) |
43+
| [pointer\_interceptor](./packages/pointer_interceptor/) | [![pub package](https://img.shields.io/pub/v/pointer_interceptor.svg)](https://pub.dev/packages/pointer_interceptor) |
44+
| [xdg\_directories](./packages/xdg_directories/) | [![pub package](https://img.shields.io/pub/v/xdg_directories.svg)](https://pub.dev/packages/xdg_directories) |

‎packages/css_colors/.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.packages
2+
pubspec.lock

‎packages/css_colors/CHANGELOG.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## 1.1.1
2+
3+
- Moved source to flutter/packages
4+
5+
## 1.1.0
6+
7+
- Add support for null safety
8+
- Update SDK constraints
9+
10+
## 1.0.0
11+
12+
- Add SDK constraints for Dart and Flutter
13+
14+
## 1.0.0
15+
16+
- Initial version

‎packages/css_colors/LICENSE‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright 2017 Google, Inc. All rights reserved.
2+
//
3+
// Redistribution and use in source and binary forms, with or without
4+
// modification, are permitted provided that the following conditions are
5+
// met:
6+
//
7+
// * Redistributions of source code must retain the above copyright
8+
// notice, this list of conditions and the following disclaimer.
9+
// * Redistributions in binary form must reproduce the above
10+
// copyright notice, this list of conditions and the following disclaimer
11+
// in the documentation and/or other materials provided with the
12+
// distribution.
13+
// * Neither the name of Google Inc. nor the names of its
14+
// contributors may be used to endorse or promote products derived from
15+
// this software without specific prior written permission.
16+
//
17+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

‎packages/css_colors/README.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
CSS Colors
2+
==========
3+
4+
This package defines color constants for the CSS colors. These color constants
5+
use the [Color](https://docs.flutter.io/flutter/dart-ui/Color-class.html) class
6+
from `dart:ui`, which means they're useful for Flutter apps.
7+
8+
Import
9+
------
10+
11+
```dart
12+
import 'package:css_colors/css_colors.dart';
13+
```
14+
15+
Use
16+
---
17+
18+
```dart
19+
new Container(color: CSSColors.orange)
20+
```
Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
// Copyright 2017 Google, Inc. All rights reserved.
2+
//
3+
// Redistribution and use in source and binary forms, with or without
4+
// modification, are permitted provided that the following conditions are
5+
// met:
6+
//
7+
// * Redistributions of source code must retain the above copyright
8+
// notice, this list of conditions and the following disclaimer.
9+
// * Redistributions in binary form must reproduce the above
10+
// copyright notice, this list of conditions and the following disclaimer
11+
// in the documentation and/or other materials provided with the
12+
// distribution.
13+
// * Neither the name of Google Inc. nor the names of its
14+
// contributors may be used to endorse or promote products derived from
15+
// this software without specific prior written permission.
16+
//
17+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
import 'dart:ui' show Color;
30+
31+
// ignore_for_file: public_member_api_docs
32+
33+
/// Provides a collection of [Color] constants corresponding to the CSS named
34+
/// colors.
35+
class CSSColors {
36+
static const Color aliceBlue = Color(0xFFF0F8FF);
37+
static const Color antiqueWhite = Color(0xFFFAEBD7);
38+
static const Color aqua = Color(0xFF00FFFF);
39+
static const Color aquamarine = Color(0xFF7FFFD4);
40+
static const Color azure = Color(0xFFF0FFFF);
41+
static const Color beige = Color(0xFFF5F5DC);
42+
static const Color bisque = Color(0xFFFFE4C4);
43+
static const Color black = Color(0xFF000000);
44+
static const Color blanchedAlmond = Color(0xFFFFEBCD);
45+
static const Color blue = Color(0xFF0000FF);
46+
static const Color blueViolet = Color(0xFF8A2BE2);
47+
static const Color brown = Color(0xFFA52A2A);
48+
static const Color burlyWood = Color(0xFFDEB887);
49+
static const Color cadetBlue = Color(0xFF5F9EA0);
50+
static const Color chartreuse = Color(0xFF7FFF00);
51+
static const Color chocolate = Color(0xFFD2691E);
52+
static const Color coral = Color(0xFFFF7F50);
53+
static const Color cornflowerBlue = Color(0xFF6495ED);
54+
static const Color cornsilk = Color(0xFFFFF8DC);
55+
static const Color crimson = Color(0xFFDC143C);
56+
static const Color cyan = Color(0xFF00FFFF);
57+
static const Color darkBlue = Color(0xFF00008B);
58+
static const Color darkCyan = Color(0xFF008B8B);
59+
static const Color darkGoldenRod = Color(0xFFB8860B);
60+
static const Color darkGray = Color(0xFFA9A9A9);
61+
static const Color darkGreen = Color(0xFF006400);
62+
static const Color darkGrey = Color(0xFFA9A9A9);
63+
static const Color darkKhaki = Color(0xFFBDB76B);
64+
static const Color darkMagenta = Color(0xFF8B008B);
65+
static const Color darkOliveGreen = Color(0xFF556B2F);
66+
static const Color darkOrange = Color(0xFFFF8C00);
67+
static const Color darkOrchid = Color(0xFF9932CC);
68+
static const Color darkRed = Color(0xFF8B0000);
69+
static const Color darkSalmon = Color(0xFFE9967A);
70+
static const Color darkSeaGreen = Color(0xFF8FBC8F);
71+
static const Color darkSlateBlue = Color(0xFF483D8B);
72+
static const Color darkSlateGray = Color(0xFF2F4F4F);
73+
static const Color darkSlateGrey = Color(0xFF2F4F4F);
74+
static const Color darkTurquoise = Color(0xFF00CED1);
75+
static const Color darkViolet = Color(0xFF9400D3);
76+
static const Color deepPink = Color(0xFFFF1493);
77+
static const Color deepSkyBlue = Color(0xFF00BFFF);
78+
static const Color dimGray = Color(0xFF696969);
79+
static const Color dimGrey = Color(0xFF696969);
80+
static const Color dodgerBlue = Color(0xFF1E90FF);
81+
static const Color fireBrick = Color(0xFFB22222);
82+
static const Color floralWhite = Color(0xFFFFFAF0);
83+
static const Color forestGreen = Color(0xFF228B22);
84+
static const Color fuchsia = Color(0xFFFF00FF);
85+
static const Color gainsboro = Color(0xFFDCDCDC);
86+
static const Color ghostWhite = Color(0xFFF8F8FF);
87+
static const Color gold = Color(0xFFFFD700);
88+
static const Color goldenRod = Color(0xFFDAA520);
89+
static const Color gray = Color(0xFF808080);
90+
static const Color green = Color(0xFF008000);
91+
static const Color greenYellow = Color(0xFFADFF2F);
92+
static const Color grey = Color(0xFF808080);
93+
static const Color honeyDew = Color(0xFFF0FFF0);
94+
static const Color hotPink = Color(0xFFFF69B4);
95+
static const Color indianRed = Color(0xFFCD5C5C);
96+
static const Color indigo = Color(0xFF4B0082);
97+
static const Color ivory = Color(0xFFFFFFF0);
98+
static const Color khaki = Color(0xFFF0E68C);
99+
static const Color lavender = Color(0xFFE6E6FA);
100+
static const Color lavenderBlush = Color(0xFFFFF0F5);
101+
static const Color lawnGreen = Color(0xFF7CFC00);
102+
static const Color lemonChiffon = Color(0xFFFFFACD);
103+
static const Color lightBlue = Color(0xFFADD8E6);
104+
static const Color lightCoral = Color(0xFFF08080);
105+
static const Color lightCyan = Color(0xFFE0FFFF);
106+
static const Color lightGoldenRodYellow = Color(0xFFFAFAD2);
107+
static const Color lightGray = Color(0xFFD3D3D3);
108+
static const Color lightGreen = Color(0xFF90EE90);
109+
static const Color lightGrey = Color(0xFFD3D3D3);
110+
static const Color lightPink = Color(0xFFFFB6C1);
111+
static const Color lightSalmon = Color(0xFFFFA07A);
112+
static const Color lightSeaGreen = Color(0xFF20B2AA);
113+
static const Color lightSkyBlue = Color(0xFF87CEFA);
114+
static const Color lightSlateGray = Color(0xFF778899);
115+
static const Color lightSlateGrey = Color(0xFF778899);
116+
static const Color lightSteelBlue = Color(0xFFB0C4DE);
117+
static const Color lightYellow = Color(0xFFFFFFE0);
118+
static const Color lime = Color(0xFF00FF00);
119+
static const Color limeGreen = Color(0xFF32CD32);
120+
static const Color linen = Color(0xFFFAF0E6);
121+
static const Color magenta = Color(0xFFFF00FF);
122+
static const Color maroon = Color(0xFF800000);
123+
static const Color mediumAquaMarine = Color(0xFF66CDAA);
124+
static const Color mediumBlue = Color(0xFF0000CD);
125+
static const Color mediumOrchid = Color(0xFFBA55D3);
126+
static const Color mediumPurple = Color(0xFF9370DB);
127+
static const Color mediumSeaGreen = Color(0xFF3CB371);
128+
static const Color mediumSlateBlue = Color(0xFF7B68EE);
129+
static const Color mediumSpringGreen = Color(0xFF00FA9A);
130+
static const Color mediumTurquoise = Color(0xFF48D1CC);
131+
static const Color mediumVioletRed = Color(0xFFC71585);
132+
static const Color midnightBlue = Color(0xFF191970);
133+
static const Color mintCream = Color(0xFFF5FFFA);
134+
static const Color mistyRose = Color(0xFFFFE4E1);
135+
static const Color moccasin = Color(0xFFFFE4B5);
136+
static const Color navajoWhite = Color(0xFFFFDEAD);
137+
static const Color navy = Color(0xFF000080);
138+
static const Color oldLace = Color(0xFFFDF5E6);
139+
static const Color olive = Color(0xFF808000);
140+
static const Color oliveDrab = Color(0xFF6B8E23);
141+
static const Color orange = Color(0xFFFFA500);
142+
static const Color orangeRed = Color(0xFFFF4500);
143+
static const Color orchid = Color(0xFFDA70D6);
144+
static const Color paleGoldenRod = Color(0xFFEEE8AA);
145+
static const Color paleGreen = Color(0xFF98FB98);
146+
static const Color paleTurquoise = Color(0xFFAFEEEE);
147+
static const Color paleVioletRed = Color(0xFFDB7093);
148+
static const Color papayaWhip = Color(0xFFFFEFD5);
149+
static const Color peachPuff = Color(0xFFFFDAB9);
150+
static const Color peru = Color(0xFFCD853F);
151+
static const Color pink = Color(0xFFFFC0CB);
152+
static const Color plum = Color(0xFFDDA0DD);
153+
static const Color powderBlue = Color(0xFFB0E0E6);
154+
static const Color purple = Color(0xFF800080);
155+
static const Color rebeccaPurple = Color(0xFF663399);
156+
static const Color red = Color(0xFFFF0000);
157+
static const Color rosyBrown = Color(0xFFBC8F8F);
158+
static const Color royalBlue = Color(0xFF4169E1);
159+
static const Color saddleBrown = Color(0xFF8B4513);
160+
static const Color salmon = Color(0xFFFA8072);
161+
static const Color sandyBrown = Color(0xFFF4A460);
162+
static const Color seaGreen = Color(0xFF2E8B57);
163+
static const Color seaShell = Color(0xFFFFF5EE);
164+
static const Color sienna = Color(0xFFA0522D);
165+
static const Color silver = Color(0xFFC0C0C0);
166+
static const Color skyBlue = Color(0xFF87CEEB);
167+
static const Color slateBlue = Color(0xFF6A5ACD);
168+
static const Color slateGray = Color(0xFF708090);
169+
static const Color slateGrey = Color(0xFF708090);
170+
static const Color snow = Color(0xFFFFFAFA);
171+
static const Color springGreen = Color(0xFF00FF7F);
172+
static const Color steelBlue = Color(0xFF4682B4);
173+
static const Color tan = Color(0xFFD2B48C);
174+
static const Color teal = Color(0xFF008080);
175+
static const Color thistle = Color(0xFFD8BFD8);
176+
static const Color tomato = Color(0xFFFF6347);
177+
static const Color turquoise = Color(0xFF40E0D0);
178+
static const Color violet = Color(0xFFEE82EE);
179+
static const Color wheat = Color(0xFFF5DEB3);
180+
static const Color white = Color(0xFFFFFFFF);
181+
static const Color whiteSmoke = Color(0xFFF5F5F5);
182+
static const Color yellow = Color(0xFFFFFF00);
183+
static const Color yellowGreen = Color(0xFF9ACD32);
184+
}

‎packages/css_colors/pubspec.yaml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: css_colors
2+
description: Defines constants for the CSS Colors
3+
repository: https://github.com/flutter/packages/tree/master/packages/css_colors
4+
version: 1.1.1
5+
6+
environment:
7+
sdk: '>=2.12.0 <3.0.0'
8+
flutter: ">=2.0.0"
9+
10+
dependencies:
11+
flutter:
12+
sdk: flutter

0 commit comments

Comments
 (0)