From 08f7c8f31fb01ac3e8e96d0e99a15effef08b4de Mon Sep 17 00:00:00 2001 From: Chris de Almeida Date: Fri, 5 Oct 2018 17:03:36 -0500 Subject: [PATCH] add _colors.scss --- source/stylesheets/base/_colors.scss | 287 +++++++++++++++++++++++++++ 1 file changed, 287 insertions(+) create mode 100644 source/stylesheets/base/_colors.scss diff --git a/source/stylesheets/base/_colors.scss b/source/stylesheets/base/_colors.scss new file mode 100644 index 0000000000..9ba40e8822 --- /dev/null +++ b/source/stylesheets/base/_colors.scss @@ -0,0 +1,287 @@ +$ember-colors: ( + accent: #413c58, + accent-2: #bc96e6, + background-1: #fffdf9, // off-white + black-: #212121, + grey-: lightgrey, + none-more-black: #000, + primary: #e04e39, // Ember orange + primary-dark: #9b2918, + primary-light: #ff8e72, + primary-lighter: #ffaf87, + primary-lightest: #edcbb1, + secondary: #4ce0b3, + secondary-dark: #377771, + white-: #fdfdfd, +); + +@function ember-color($key: 'primary') { + @return map-get($ember-colors, $key); +} + +@function foreground-for($key: 'background-1') { + + @return map-get($ember-colors, + map-get( + ( + accent: white-, + accent-2: black-, + background-1: black-, + grey-: black-, + primary: none-more-black, + primary-dark: white-, + primary-light: black-, + primary-lighter: black-, + primary-lightest: black-, + secondary: black-, + secondary-dark: white-, + white-: black-, + ), $key)); + +} + +@function background-for($key: 'foreground-1') { + // do this, or find (elegant) way to reverse foreground-for map + @return map-get($ember-colors, + map-get( + (none-more-black: primary, + ), $key)); + +} + +// following is for colors.hbs + +.color-box { + background-color: ember-color('white-'); + color: ember-color('black-'); + float: left; + font-size: 1.6rem; + margin: 1rem; + text-align: center; + width: 38rem; +} + +.color-box__table { + border: solid .1rem ember-color('grey-'); + height: 100%; + width: 100%; + + td { + + border: .1rem solid ember-color('grey-'); + padding: .5rem; + vertical-align: middle; + + code { font-family: Consolas, monospace; } + + } + +} + +.color-box__example { + height: 10rem; +} + +.color-box__accent { + background-color: ember-color('accent'); + color: foreground-for('accent'); +} + +.color-box__accent-2 { + background-color: ember-color('accent-2'); + color: foreground-for('accent-2'); +} + +.color-box__background-1 { + background-color: ember-color('background-1'); + color: foreground-for('background-1'); +} + +.color-box__grey { + background-color: ember-color('grey-'); + color: foreground-for('grey-'); +} + +.color-box__primary { + background-color: ember-color('primary'); + color: foreground-for('primary'); +} + +.color-box__primary-dark { + background-color: ember-color('primary-dark'); + color: foreground-for('primary-dark'); +} + +.color-box__primary-light { + background-color: ember-color('primary-light'); + color: foreground-for('primary-light'); +} + +.color-box__primary-lighter { + background-color: ember-color('primary-lighter'); + color: foreground-for('primary-lighter'); +} + +.color-box__primary-lightest { + background-color: ember-color('primary-lightest'); + color: foreground-for('primary-lightest'); +} + +.color-box__secondary { + background-color: ember-color('secondary'); + color: foreground-for('secondary'); +} + +.color-box__secondary-dark { + background-color: ember-color('secondary-dark'); + color: foreground-for('secondary-dark'); +} + +.color-box__white { + background-color: ember-color('white-'); + color: foreground-for('white-'); +} + +.color-invert-button { + font-size: 3.6rem; + margin: 1rem; +} + +// colors.hbs +// +//
+// {{!-- this button requires jQuery to work ¯\_(ツ)_/¯ --}} +// +//
+// +//
+// +// +// +// +// +// +// +//
The quick brown fox jumps over the lazy dog.
bg
$ember-colors.accent
#413c58
fg
$ember-colors.white-
#fdfdfd
conrat
10.26
+//
+// +//
+// +// +// +// +// +// +// +//
The quick brown fox jumps over the lazy dog.
bg
$ember-colors.accent-2
#bc96e6
fg
$ember-colors.black-
#212121
conrat
6.63
+//
+// +//
+// +// +// +// +// +// +// +//
The quick brown fox jumps over the lazy dog.
bg
$ember-colors.background-1
#fffdf9
fg
$ember-colors.black-
#212121
conrat
15.85
+//
+// +//
+// +// +// +// +// +// +// +//
The quick brown fox jumps over the lazy dog.
bg
$ember-colors.grey-
#d3d3d3
fg
$ember-colors.black-
#212121
conrat
10.76
+//
+// +//
+// +// +// +// +// +// +// +//
The quick brown fox jumps over the lazy dog.
bg
$ember-colors.primary
#e04e39
fg
$ember-colors.none-more-black
#000
conrat
5.32
+//
+// +//
+// +// +// +// +// +// +// +//
The quick brown fox jumps over the lazy dog.
bg
$ember-colors.primary-dark
#9b2918
fg
$ember-colors.white-
#fdfdfd
conrat
7.58
+//
+// +//
+// +// +// +// +// +// +// +//
The quick brown fox jumps over the lazy dog.
bg
$ember-colors.primary-light
#ff8e72
fg
$ember-colors.black-
#212121
conrat
7.18
+//
+// +//
+// +// +// +// +// +// +// +//
The quick brown fox jumps over the lazy dog.
bg
$ember-colors.primary-lighter
#ffaf87
fg
$ember-colors.black-
#212121
conrat
9
+//
+// +//
+// +// +// +// +// +// +// +//
The quick brown fox jumps over the lazy dog.
bg
$ember-colors.primary-lightest
#edcbb1
fg
$ember-colors.black-
#212121
conrat
10.56
+//
+// +//
+// +// +// +// +// +// +// +//
The quick brown fox jumps over the lazy dog.
bg
$ember-colors.secondary
#4ce0b3
fg
$ember-colors.black-
#212121
conrat
9.68
+//
+// +//
+// +// +// +// +// +// +// +//
The quick brown fox jumps over the lazy dog.
bg
$ember-colors.secondary-dark
#377771
fg
$ember-colors.white-
#fdfdfd
conrat
9.68
+//
+// +//
+// +// +// +// +// +// +// +//
The quick brown fox jumps over the lazy dog.
bg
$ember-colors.white-
#fdfdfd
fg
$ember-colors.black-
#212121
conrat
15.83
+//