From 3241ed8d1fe98bfd2a7ded307e9d0c53e3879d9e Mon Sep 17 00:00:00 2001 From: Vince Varga Date: Mon, 27 Dec 2021 16:20:30 +0100 Subject: [PATCH] Release 0.2.0+4, almost ready for 1.0.0? --- CHANGELOG.md | 9 +- README.md | 34 ++- example/lib/main.dart | 2 +- lib/kolors.dart | 612 +++++++++++++++++++++++++++++++++++++++++- pubspec.yaml | 2 +- 5 files changed, 644 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d4801a..cafc544 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/README.md b/README.md index 7e447d2..1867ada 100644 --- a/README.md +++ b/README.md @@ -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 +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. +Flutter package kolors example app in action -Please keep in mind that this package has a `dart:ui` dependency (and [therefore runs only with Flutter](https://twitter.com/vincevargadev/status/1471965783463010311)). \ No newline at end of file +Please keep in mind that this package has a `dart:ui` dependency (and [therefore runs only with Flutter](https://twitter.com/vincevargadev/status/1471965783463010311)). diff --git a/example/lib/main.dart b/example/lib/main.dart index 6129a21..78ddb54 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -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( diff --git a/lib/kolors.dart b/lib/kolors.dart index 35cdb6f..dd56944 100644 --- a/lib/kolors.dart +++ b/lib/kolors.dart @@ -7,7 +7,7 @@ /// /// Keep in mind that the [Color] has a Flutter dependency, so these named /// colors can be only used from Flutter projects. -library html_colors; +library kolors; import 'dart:ui'; @@ -154,6 +154,7 @@ abstract class Kolors { static const slateGray = Color(0xFF708090); static const darkSlateGray = Color(0xFF2F4F4F); static const black = Color(0xFF000000); + static const values = [ indianRed, lightCoral, @@ -298,6 +299,10 @@ abstract class Kolors { black, ]; + /// Return all colors in [Kolors] as a Map. + /// + /// Can be useful when working with UIs where the user can see all colors + /// and select from a list. static Map asMap() => { 'indianRed': indianRed, 'lightCoral': lightCoral, @@ -446,14 +451,49 @@ abstract class Kolors { /// Grouped colors for the different shades of Red from the supported HTML /// colors. abstract class KolorReds { + /// Red of "indianRed". + /// + /// This is the same color as [Kolors.indianRed]. static const indianRed = Color(0xFFCD5C5C); + + /// Red of "lightCoral". + /// + /// This is the same color as [Kolors.lightCoral]. static const lightCoral = Color(0xFFF08080); + + /// Red of "salmon". + /// + /// This is the same color as [Kolors.salmon]. static const salmon = Color(0xFFFA8072); + + /// Red of "darkSalmon". + /// + /// This is the same color as [Kolors.darkSalmon]. static const darkSalmon = Color(0xFFE9967A); + + /// Red of "lightSalmon". + /// + /// This is the same color as [Kolors.lightSalmon]. static const lightSalmon = Color(0xFFFFA07A); + + /// Red of "crimson". + /// + /// This is the same color as [Kolors.crimson]. static const crimson = Color(0xFFDC143C); + + /// Red of "red". + /// + /// This is the same color as [Kolors.red]. static const red = Color(0xFFFF0000); + + /// Red of "fireBrick". + /// + /// This is the same color as [Kolors.fireBrick]. static const fireBrick = Color(0xFFB22222); + + /// Red of "darkRed". + /// + /// This is the same color as [Kolors.darkRed]. static const darkRed = Color(0xFF8B0000); static const values = [ indianRed, @@ -467,6 +507,10 @@ abstract class KolorReds { darkRed, ]; + /// Return all colors in [KolorReds] as a Map. + /// + /// Can be useful when working with UIs where the user can see all colors + /// and select from a list. static Map asMap() => { 'indianRed': indianRed, 'lightCoral': lightCoral, @@ -483,11 +527,34 @@ abstract class KolorReds { /// Grouped colors for the different shades of Pink from the supported HTML /// colors. abstract class KolorPinks { + /// Pink of "pink". + /// + /// This is the same color as [Kolors.pink]. static const pink = Color(0xFFFFC0CB); + + /// Pink of "lightPink". + /// + /// This is the same color as [Kolors.lightPink]. static const lightPink = Color(0xFFFFB6C1); + + /// Pink of "hotPink". + /// + /// This is the same color as [Kolors.hotPink]. static const hotPink = Color(0xFFFF69B4); + + /// Pink of "deepPink". + /// + /// This is the same color as [Kolors.deepPink]. static const deepPink = Color(0xFFFF1493); + + /// Pink of "mediumVioletRed". + /// + /// This is the same color as [Kolors.mediumVioletRed]. static const mediumVioletRed = Color(0xFFC71585); + + /// Pink of "paleVioletRed". + /// + /// This is the same color as [Kolors.paleVioletRed]. static const paleVioletRed = Color(0xFFDB7093); static const values = [ pink, @@ -498,6 +565,10 @@ abstract class KolorPinks { paleVioletRed, ]; + /// Return all colors in [KolorPinks] as a Map. + /// + /// Can be useful when working with UIs where the user can see all colors + /// and select from a list. static Map asMap() => { 'pink': pink, 'lightPink': lightPink, @@ -511,11 +582,34 @@ abstract class KolorPinks { /// Grouped colors for the different shades of Orange from the supported HTML /// colors. abstract class KolorOranges { + /// Orange of "lightSalmon". + /// + /// This is the same color as [Kolors.lightSalmon]. static const lightSalmon = Color(0xFFFFA07A); + + /// Orange of "coral". + /// + /// This is the same color as [Kolors.coral]. static const coral = Color(0xFFFF7F50); + + /// Orange of "tomato". + /// + /// This is the same color as [Kolors.tomato]. static const tomato = Color(0xFFFF6347); + + /// Orange of "orangeRed". + /// + /// This is the same color as [Kolors.orangeRed]. static const orangeRed = Color(0xFFFF4500); + + /// Orange of "darkOrange". + /// + /// This is the same color as [Kolors.darkOrange]. static const darkOrange = Color(0xFFFF8C00); + + /// Orange of "orange". + /// + /// This is the same color as [Kolors.orange]. static const orange = Color(0xFFFFA500); static const values = [ lightSalmon, @@ -526,6 +620,10 @@ abstract class KolorOranges { orange, ]; + /// Return all colors in [KolorOranges] as a Map. + /// + /// Can be useful when working with UIs where the user can see all colors + /// and select from a list. static Map asMap() => { 'lightSalmon': lightSalmon, 'coral': coral, @@ -539,16 +637,59 @@ abstract class KolorOranges { /// Grouped colors for the different shades of Yellow from the supported HTML /// colors. abstract class KolorYellows { + /// Yellow of "gold". + /// + /// This is the same color as [Kolors.gold]. static const gold = Color(0xFFFFD700); + + /// Yellow of "yellow". + /// + /// This is the same color as [Kolors.yellow]. static const yellow = Color(0xFFFFFF00); + + /// Yellow of "lightYellow". + /// + /// This is the same color as [Kolors.lightYellow]. static const lightYellow = Color(0xFFFFFFE0); + + /// Yellow of "lemonChiffon". + /// + /// This is the same color as [Kolors.lemonChiffon]. static const lemonChiffon = Color(0xFFFFFACD); + + /// Yellow of "lightGoldenrodYellow". + /// + /// This is the same color as [Kolors.lightGoldenrodYellow]. static const lightGoldenrodYellow = Color(0xFFFAFAD2); + + /// Yellow of "papayaWhip". + /// + /// This is the same color as [Kolors.papayaWhip]. static const papayaWhip = Color(0xFFFFEFD5); + + /// Yellow of "moccasin". + /// + /// This is the same color as [Kolors.moccasin]. static const moccasin = Color(0xFFFFE4B5); + + /// Yellow of "peachPuff". + /// + /// This is the same color as [Kolors.peachPuff]. static const peachPuff = Color(0xFFFFDAB9); + + /// Yellow of "paleGoldenrod". + /// + /// This is the same color as [Kolors.paleGoldenrod]. static const paleGoldenrod = Color(0xFFEEE8AA); + + /// Yellow of "khaki". + /// + /// This is the same color as [Kolors.khaki]. static const khaki = Color(0xFFF0E68C); + + /// Yellow of "darkKhaki". + /// + /// This is the same color as [Kolors.darkKhaki]. static const darkKhaki = Color(0xFFBDB76B); static const values = [ gold, @@ -564,6 +705,10 @@ abstract class KolorYellows { darkKhaki, ]; + /// Return all colors in [KolorYellows] as a Map. + /// + /// Can be useful when working with UIs where the user can see all colors + /// and select from a list. static Map asMap() => { 'gold': gold, 'yellow': yellow, @@ -582,24 +727,99 @@ abstract class KolorYellows { /// Grouped colors for the different shades of Purple from the supported HTML /// colors. abstract class KolorPurples { + /// Purple of "lavender". + /// + /// This is the same color as [Kolors.lavender]. static const lavender = Color(0xFFE6E6FA); + + /// Purple of "thistle". + /// + /// This is the same color as [Kolors.thistle]. static const thistle = Color(0xFFD8BFD8); + + /// Purple of "plum". + /// + /// This is the same color as [Kolors.plum]. static const plum = Color(0xFFDDA0DD); + + /// Purple of "violet". + /// + /// This is the same color as [Kolors.violet]. static const violet = Color(0xFFEE82EE); + + /// Purple of "orchid". + /// + /// This is the same color as [Kolors.orchid]. static const orchid = Color(0xFFDA70D6); + + /// Purple of "fuchsia". + /// + /// This is the same color as [Kolors.fuchsia]. static const fuchsia = Color(0xFFFF00FF); + + /// Purple of "magenta". + /// + /// This is the same color as [Kolors.magenta]. static const magenta = Color(0xFFFF00FF); + + /// Purple of "mediumOrchid". + /// + /// This is the same color as [Kolors.mediumOrchid]. static const mediumOrchid = Color(0xFFBA55D3); + + /// Purple of "mediumPurple". + /// + /// This is the same color as [Kolors.mediumPurple]. static const mediumPurple = Color(0xFF9370DB); + + /// Purple of "rebeccaPurple". + /// + /// This is the same color as [Kolors.rebeccaPurple]. static const rebeccaPurple = Color(0xFF663399); + + /// Purple of "blueViolet". + /// + /// This is the same color as [Kolors.blueViolet]. static const blueViolet = Color(0xFF8A2BE2); + + /// Purple of "darkViolet". + /// + /// This is the same color as [Kolors.darkViolet]. static const darkViolet = Color(0xFF9400D3); + + /// Purple of "darkOrchid". + /// + /// This is the same color as [Kolors.darkOrchid]. static const darkOrchid = Color(0xFF9932CC); + + /// Purple of "darkMagenta". + /// + /// This is the same color as [Kolors.darkMagenta]. static const darkMagenta = Color(0xFF8B008B); + + /// Purple of "purple". + /// + /// This is the same color as [Kolors.purple]. static const purple = Color(0xFF800080); + + /// Purple of "indigo". + /// + /// This is the same color as [Kolors.indigo]. static const indigo = Color(0xFF4B0082); + + /// Purple of "slateBlue". + /// + /// This is the same color as [Kolors.slateBlue]. static const slateBlue = Color(0xFF6A5ACD); + + /// Purple of "darkSlateBlue". + /// + /// This is the same color as [Kolors.darkSlateBlue]. static const darkSlateBlue = Color(0xFF483D8B); + + /// Purple of "mediumSlateBlue". + /// + /// This is the same color as [Kolors.mediumSlateBlue]. static const mediumSlateBlue = Color(0xFF7B68EE); static const values = [ lavender, @@ -623,6 +843,10 @@ abstract class KolorPurples { mediumSlateBlue, ]; + /// Return all colors in [KolorPurples] as a Map. + /// + /// Can be useful when working with UIs where the user can see all colors + /// and select from a list. static Map asMap() => { 'lavender': lavender, 'thistle': thistle, @@ -649,28 +873,119 @@ abstract class KolorPurples { /// Grouped colors for the different shades of Green from the supported HTML /// colors. abstract class KolorGreens { + /// Green of "greenYellow". + /// + /// This is the same color as [Kolors.greenYellow]. static const greenYellow = Color(0xFFADFF2F); + + /// Green of "chartreuse". + /// + /// This is the same color as [Kolors.chartreuse]. static const chartreuse = Color(0xFF7FFF00); + + /// Green of "lawnGreen". + /// + /// This is the same color as [Kolors.lawnGreen]. static const lawnGreen = Color(0xFF7CFC00); + + /// Green of "=". + /// + /// This is the same color as [Kolors.=]. static const lime = Color(0xFF00FF00); + + /// Green of "limeGreen". + /// + /// This is the same color as [Kolors.limeGreen]. static const limeGreen = Color(0xFF32CD32); + + /// Green of "paleGreen". + /// + /// This is the same color as [Kolors.paleGreen]. static const paleGreen = Color(0xFF98FB98); + + /// Green of "lightGreen". + /// + /// This is the same color as [Kolors.lightGreen]. static const lightGreen = Color(0xFF90EE90); + + /// Green of "mediumSpringGreen". + /// + /// This is the same color as [Kolors.mediumSpringGreen]. static const mediumSpringGreen = Color(0xFF00FA9A); + + /// Green of "springGreen". + /// + /// This is the same color as [Kolors.springGreen]. static const springGreen = Color(0xFF00FF7F); + + /// Green of "mediumSeaGreen". + /// + /// This is the same color as [Kolors.mediumSeaGreen]. static const mediumSeaGreen = Color(0xFF3CB371); + + /// Green of "seaGreen". + /// + /// This is the same color as [Kolors.seaGreen]. static const seaGreen = Color(0xFF2E8B57); + + /// Green of "forestGreen". + /// + /// This is the same color as [Kolors.forestGreen]. static const forestGreen = Color(0xFF228B22); + + /// Green of "green". + /// + /// This is the same color as [Kolors.green]. static const green = Color(0xFF008000); + + /// Green of "darkGreen". + /// + /// This is the same color as [Kolors.darkGreen]. static const darkGreen = Color(0xFF006400); + + /// Green of "yellowGreen". + /// + /// This is the same color as [Kolors.yellowGreen]. static const yellowGreen = Color(0xFF9ACD32); + + /// Green of "oliveDrab". + /// + /// This is the same color as [Kolors.oliveDrab]. static const oliveDrab = Color(0xFF6B8E23); + + /// Green of "olive". + /// + /// This is the same color as [Kolors.olive]. static const olive = Color(0xFF808000); + + /// Green of "darkOliveGreen". + /// + /// This is the same color as [Kolors.darkOliveGreen]. static const darkOliveGreen = Color(0xFF556B2F); + + /// Green of "mediumAquamarine". + /// + /// This is the same color as [Kolors.mediumAquamarine]. static const mediumAquamarine = Color(0xFF66CDAA); + + /// Green of "darkSeaGreen". + /// + /// This is the same color as [Kolors.darkSeaGreen]. static const darkSeaGreen = Color(0xFF8FBC8B); + + /// Green of "lightSeaGreen". + /// + /// This is the same color as [Kolors.lightSeaGreen]. static const lightSeaGreen = Color(0xFF20B2AA); + + /// Green of "darkCyan". + /// + /// This is the same color as [Kolors.darkCyan]. static const darkCyan = Color(0xFF008B8B); + + /// Green of "=". + /// + /// This is the same color as [Kolors.=]. static const teal = Color(0xFF008080); static const values = [ greenYellow, @@ -698,6 +1013,10 @@ abstract class KolorGreens { teal, ]; + /// Return all colors in [KolorGreens] as a Map. + /// + /// Can be useful when working with UIs where the user can see all colors + /// and select from a list. static Map asMap() => { 'greenYellow': greenYellow, 'chartreuse': chartreuse, @@ -728,31 +1047,131 @@ abstract class KolorGreens { /// Grouped colors for the different shades of Blue from the supported HTML /// colors. abstract class KolorBlues { + /// Blue of "aqua". + /// + /// This is the same color as [Kolors.aqua]. static const aqua = Color(0xFF00FFFF); + + /// Blue of "cyan". + /// + /// This is the same color as [Kolors.cyan]. static const cyan = Color(0xFF00FFFF); + + /// Blue of "lightCyan". + /// + /// This is the same color as [Kolors.lightCyan]. static const lightCyan = Color(0xFFE0FFFF); + + /// Blue of "paleTurquoise". + /// + /// This is the same color as [Kolors.paleTurquoise]. static const paleTurquoise = Color(0xFFAFEEEE); + + /// Blue of "aquamarine". + /// + /// This is the same color as [Kolors.aquamarine]. static const aquamarine = Color(0xFF7FFFD4); + + /// Blue of "turquoise". + /// + /// This is the same color as [Kolors.turquoise]. static const turquoise = Color(0xFF40E0D0); + + /// Blue of "mediumTurquoise". + /// + /// This is the same color as [Kolors.mediumTurquoise]. static const mediumTurquoise = Color(0xFF48D1CC); + + /// Blue of "darkTurquoise". + /// + /// This is the same color as [Kolors.darkTurquoise]. static const darkTurquoise = Color(0xFF00CED1); + + /// Blue of "cadetBlue". + /// + /// This is the same color as [Kolors.cadetBlue]. static const cadetBlue = Color(0xFF5F9EA0); + + /// Blue of "steelBlue". + /// + /// This is the same color as [Kolors.steelBlue]. static const steelBlue = Color(0xFF4682B4); + + /// Blue of "lightSteelBlue". + /// + /// This is the same color as [Kolors.lightSteelBlue]. static const lightSteelBlue = Color(0xFFB0C4DE); + + /// Blue of "powderBlue". + /// + /// This is the same color as [Kolors.powderBlue]. static const powderBlue = Color(0xFFB0E0E6); + + /// Blue of "lightBlue". + /// + /// This is the same color as [Kolors.lightBlue]. static const lightBlue = Color(0xFFADD8E6); + + /// Blue of "skyBlue". + /// + /// This is the same color as [Kolors.skyBlue]. static const skyBlue = Color(0xFF87CEEB); + + /// Blue of "lightSkyBlue". + /// + /// This is the same color as [Kolors.lightSkyBlue]. static const lightSkyBlue = Color(0xFF87CEFA); + + /// Blue of "deepSkyBlue". + /// + /// This is the same color as [Kolors.deepSkyBlue]. static const deepSkyBlue = Color(0xFF00BFFF); + + /// Blue of "dodgerBlue". + /// + /// This is the same color as [Kolors.dodgerBlue]. static const dodgerBlue = Color(0xFF1E90FF); + + /// Blue of "cornflowerBlue". + /// + /// This is the same color as [Kolors.cornflowerBlue]. static const cornflowerBlue = Color(0xFF6495ED); + + /// Blue of "mediumSlateBlue". + /// + /// This is the same color as [Kolors.mediumSlateBlue]. static const mediumSlateBlue = Color(0xFF7B68EE); + + /// Blue of "royalBlue". + /// + /// This is the same color as [Kolors.royalBlue]. static const royalBlue = Color(0xFF4169E1); + + /// Blue of "blue". + /// + /// This is the same color as [Kolors.blue]. static const blue = Color(0xFF0000FF); + + /// Blue of "mediumBlue". + /// + /// This is the same color as [Kolors.mediumBlue]. static const mediumBlue = Color(0xFF0000CD); + + /// Blue of "darkBlue". + /// + /// This is the same color as [Kolors.darkBlue]. static const darkBlue = Color(0xFF00008B); + + /// Blue of "navy". + /// + /// This is the same color as [Kolors.navy]. static const navy = Color(0xFF000080); + + /// Blue of "midnightBlue". + /// + /// This is the same color as [Kolors.midnightBlue]. static const midnightBlue = Color(0xFF191970); + static const values = [ aqua, cyan, @@ -781,6 +1200,10 @@ abstract class KolorBlues { midnightBlue, ]; + /// Return all colors in [KolorBlues] as a Map. + /// + /// Can be useful when working with UIs where the user can see all colors + /// and select from a list. static Map asMap() => { 'aqua': aqua, 'cyan': cyan, @@ -813,22 +1236,89 @@ abstract class KolorBlues { /// Grouped colors for the different shades of Brown from the supported HTML /// colors. abstract class KolorBrowns { + /// Brown of "cornsilk". + /// + /// This is the same color as [Kolors.cornsilk]. static const cornsilk = Color(0xFFFFF8DC); + + /// Brown of "blanchedAlmond". + /// + /// This is the same color as [Kolors.blanchedAlmond]. static const blanchedAlmond = Color(0xFFFFEBCD); + + /// Brown of "bisque". + /// + /// This is the same color as [Kolors.bisque]. static const bisque = Color(0xFFFFE4C4); + + /// Brown of "navajoWhite". + /// + /// This is the same color as [Kolors.navajoWhite]. static const navajoWhite = Color(0xFFFFDEAD); + + /// Brown of "wheat". + /// + /// This is the same color as [Kolors.wheat]. static const wheat = Color(0xFFF5DEB3); + + /// Brown of "burlyWood". + /// + /// This is the same color as [Kolors.burlyWood]. static const burlyWood = Color(0xFFDEB887); + + /// Brown of "tan". + /// + /// This is the same color as [Kolors.tan]. static const tan = Color(0xFFD2B48C); + + /// Brown of "rosyBrown". + /// + /// This is the same color as [Kolors.rosyBrown]. static const rosyBrown = Color(0xFFBC8F8F); + + /// Brown of "sandyBrown". + /// + /// This is the same color as [Kolors.sandyBrown]. static const sandyBrown = Color(0xFFF4A460); + + /// Brown of "goldenrod". + /// + /// This is the same color as [Kolors.goldenrod]. static const goldenrod = Color(0xFFDAA520); + + /// Brown of "darkGoldenrod". + /// + /// This is the same color as [Kolors.darkGoldenrod]. static const darkGoldenrod = Color(0xFFB8860B); + + /// Brown of "peru". + /// + /// This is the same color as [Kolors.peru]. static const peru = Color(0xFFCD853F); + + /// Brown of "chocolate". + /// + /// This is the same color as [Kolors.chocolate]. static const chocolate = Color(0xFFD2691E); + + /// Brown of "saddleBrown". + /// + /// This is the same color as [Kolors.saddleBrown]. static const saddleBrown = Color(0xFF8B4513); + + /// Brown of "sienna". + /// + /// This is the same color as [Kolors.sienna]. static const sienna = Color(0xFFA0522D); + + /// Brown of "brown". + /// + /// This is the same color as [Kolors.brown]. static const brown = Color(0xFFA52A2A); + + /// Brown of "maroon". + /// + /// This is the same color as [Kolors.maroon]. static const maroon = Color(0xFF800000); static const values = [ cornsilk, @@ -850,6 +1340,10 @@ abstract class KolorBrowns { maroon, ]; + /// Return all colors in [KolorBrowns] as a Map. + /// + /// Can be useful when working with UIs where the user can see all colors + /// and select from a list. static Map asMap() => { 'cornsilk': cornsilk, 'blanchedAlmond': blanchedAlmond, @@ -874,23 +1368,91 @@ abstract class KolorBrowns { /// Grouped colors for the different shades of White from the supported HTML /// colors. abstract class KolorWhites { + /// White of "white". + /// + /// This is the same color as [Kolors.white]. static const white = Color(0xFFFFFFFF); + + /// White of "snow". + /// + /// This is the same color as [Kolors.snow]. static const snow = Color(0xFFFFFAFA); + + /// White of "honeyDew". + /// + /// This is the same color as [Kolors.honeyDew]. static const honeyDew = Color(0xFFF0FFF0); + + /// White of "mintCream". + /// + /// This is the same color as [Kolors.mintCream]. static const mintCream = Color(0xFFF5FFFA); + + /// White of "azure". + /// + /// This is the same color as [Kolors.azure]. static const azure = Color(0xFFF0FFFF); + + /// White of "aliceBlue". + /// + /// This is the same color as [Kolors.aliceBlue]. static const aliceBlue = Color(0xFFF0F8FF); + + /// White of "ghostWhite". + /// + /// This is the same color as [Kolors.ghostWhite]. static const ghostWhite = Color(0xFFF8F8FF); + + /// White of "whiteSmoke". + /// + /// This is the same color as [Kolors.whiteSmoke]. static const whiteSmoke = Color(0xFFF5F5F5); + + /// White of "seaShell". + /// + /// This is the same color as [Kolors.seaShell]. static const seaShell = Color(0xFFFFF5EE); + + /// White of "beige". + /// + /// This is the same color as [Kolors.beige]. static const beige = Color(0xFFF5F5DC); + + /// White of "oldLace". + /// + /// This is the same color as [Kolors.oldLace]. static const oldLace = Color(0xFFFDF5E6); + + /// White of "floralWhite". + /// + /// This is the same color as [Kolors.floralWhite]. static const floralWhite = Color(0xFFFFFAF0); + + /// White of "ivory". + /// + /// This is the same color as [Kolors.ivory]. static const ivory = Color(0xFFFFFFF0); + + /// White of "antiqueWhite". + /// + /// This is the same color as [Kolors.antiqueWhite]. static const antiqueWhite = Color(0xFFFAEBD7); + + /// White of "linen". + /// + /// This is the same color as [Kolors.linen]. static const linen = Color(0xFFFAF0E6); + + /// White of "lavenderBlush". + /// + /// This is the same color as [Kolors.lavenderBlush]. static const lavenderBlush = Color(0xFFFFF0F5); + + /// White of "mistyRose". + /// + /// This is the same color as [Kolors.mistyRose]. static const mistyRose = Color(0xFFFFE4E1); + static const values = [ white, snow, @@ -911,6 +1473,10 @@ abstract class KolorWhites { mistyRose, ]; + /// Return all colors in [KolorWhites] as a Map. + /// + /// Can be useful when working with UIs where the user can see all colors + /// and select from a list. static Map asMap() => { 'white': white, 'snow': snow, @@ -935,16 +1501,56 @@ abstract class KolorWhites { /// Grouped colors for the different shades of Gray from the supported HTML /// colors. abstract class KolorGrays { + /// Gray of "gainsboro". + /// + /// This is the same color as [Kolors.gainsboro]. static const gainsboro = Color(0xFFDCDCDC); + + /// Gray of "lightGray". + /// + /// This is the same color as [Kolors.lightGray]. static const lightGray = Color(0xFFD3D3D3); + + /// Gray of "silver". + /// + /// This is the same color as [Kolors.silver]. static const silver = Color(0xFFC0C0C0); + + /// Gray of "darkGray". + /// + /// This is the same color as [Kolors.darkGray]. static const darkGray = Color(0xFFA9A9A9); + + /// Gray of "gray". + /// + /// This is the same color as [Kolors.gray]. static const gray = Color(0xFF808080); + + /// Gray of "dimGray". + /// + /// This is the same color as [Kolors.dimGray]. static const dimGray = Color(0xFF696969); + + /// Gray of "lightSlateGray". + /// + /// This is the same color as [Kolors.lightSlateGray]. static const lightSlateGray = Color(0xFF778899); + + /// Gray of "slateGray". + /// + /// This is the same color as [Kolors.slateGray]. static const slateGray = Color(0xFF708090); + + /// Gray of "darkSlateGray". + /// + /// This is the same color as [Kolors.darkSlateGray]. static const darkSlateGray = Color(0xFF2F4F4F); + + /// Gray of "black". + /// + /// This is the same color as [Kolors.black]. static const black = Color(0xFF000000); + static const values = [ gainsboro, lightGray, @@ -958,6 +1564,10 @@ abstract class KolorGrays { black, ]; + /// Return all colors in [KolorGrays] as a Map. + /// + /// Can be useful when working with UIs where the user can see all colors + /// and select from a list. static Map asMap() => { 'gainsboro': gainsboro, 'lightGray': lightGray, diff --git a/pubspec.yaml b/pubspec.yaml index b1e7d14..6b6ebd4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: kolors description: The named HTML colors that you can use in your Flutter apps. -version: 0.2.0+3 +version: 0.2.0+4 homepage: https://www.github.com/dartsidedev/kolors repository: https://www.github.com/dartsidedev/kolors issue_tracker: https://www.github.com/dartsidedev/kolors/issues