Skip to content

Commit

Permalink
Make colorsByName a normal map
Browse files Browse the repository at this point in the history
There was no reason for this to be a normalized map, since color names
don't contain dashes or underscores.
  • Loading branch information
nex3 committed Jul 16, 2019
1 parent d91e758 commit 7f2055e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/src/color_names.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@

import 'package:collection/collection.dart';

import 'utils.dart';
import 'value.dart';

/// A map from (lowercase) color names to their color values.
final colorsByName = normalizedMap<SassColor>({
final colorsByName = {
// Note: these are in reverse alphabetical order so that colors with multiple
// names will use the alphabetically first option in [namesByColor].
'yellowgreen': SassColor.rgb(0x9A, 0xCD, 0x32),
Expand Down Expand Up @@ -160,7 +159,7 @@ final colorsByName = normalizedMap<SassColor>({
'aqua': SassColor.rgb(0x00, 0xFF, 0xFF),
'antiquewhite': SassColor.rgb(0xFA, 0xEB, 0xD7),
'aliceblue': SassColor.rgb(0xF0, 0xF8, 0xFF),
});
};

/// A map from Sass colors to (lowercase) color names.
final namesByColor = mapMap<String, SassColor, SassColor, String>(colorsByName,
Expand Down

0 comments on commit 7f2055e

Please sign in to comment.