diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c8b2a1..72d90ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 1.1.0 + +2014-11-20 + +- Added text color (alpha) for black and white + # 1.0.0 2014-11-14 diff --git a/bower.json b/bower.json index 0168ed6..a63dc24 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "google-material-color", - "version": "1.0.0", + "version": "1.1.0", "description": "Google material color (http://www.google.com/design/spec/style/color.html) implementation for Sass, Less, Stylus, CSS and JS.", "homepage": "https://github.com/danlevan/google-material-color", "authors": [ diff --git a/dist/palette.css b/dist/palette.css index edfe584..1112967 100644 --- a/dist/palette.css +++ b/dist/palette.css @@ -1671,6 +1671,42 @@ .palette-Black-500.text { color: #000000; } +.palette-Black-Text.bg { + background-color: rgba(0,0,0,0.87); +} +.palette-Black-Text.text { + color: rgba(0,0,0,0.87); +} +.palette-Black-Secondary-Text.bg { + background-color: rgba(0,0,0,0.54); +} +.palette-Black-Secondary-Text.text { + color: rgba(0,0,0,0.54); +} +.palette-Black-Icons.bg { + background-color: rgba(0,0,0,0.54); +} +.palette-Black-Icons.text { + color: rgba(0,0,0,0.54); +} +.palette-Black-Disabled.bg { + background-color: rgba(0,0,0,0.26); +} +.palette-Black-Disabled.text { + color: rgba(0,0,0,0.26); +} +.palette-Black-Hint-Text.bg { + background-color: rgba(0,0,0,0.26); +} +.palette-Black-Hint-Text.text { + color: rgba(0,0,0,0.26); +} +.palette-Black-Dividers.bg { + background-color: rgba(0,0,0,0.12); +} +.palette-Black-Dividers.text { + color: rgba(0,0,0,0.12); +} .palette-White.bg { background-color: #ffffff; @@ -1684,5 +1720,41 @@ .palette-White-500.text { color: #ffffff; } +.palette-White-Text.bg { + background-color: #ffffff; +} +.palette-White-Text.text { + color: #ffffff; +} +.palette-White-Secondary-Text.bg { + background-color: rgba(255,255,255,0.7); +} +.palette-White-Secondary-Text.text { + color: rgba(255,255,255,0.7); +} +.palette-White-Icons.bg { + background-color: #ffffff; +} +.palette-White-Icons.text { + color: #ffffff; +} +.palette-White-Disabled.bg { + background-color: rgba(255,255,255,0.3); +} +.palette-White-Disabled.text { + color: rgba(255,255,255,0.3); +} +.palette-White-Hint-Text.bg { + background-color: rgba(255,255,255,0.3); +} +.palette-White-Hint-Text.text { + color: rgba(255,255,255,0.3); +} +.palette-White-Dividers.bg { + background-color: rgba(255,255,255,0.12); +} +.palette-White-Dividers.text { + color: rgba(255,255,255,0.12); +} diff --git a/dist/palette.js b/dist/palette.js index 3436b5d..bb912c8 100644 --- a/dist/palette.js +++ b/dist/palette.js @@ -326,10 +326,22 @@ 'Black': { '500': '#000000', + 'Text': 'rgba(0,0,0,0.87)', + 'Secondary Text': 'rgba(0,0,0,0.54)', + 'Icons': 'rgba(0,0,0,0.54)', + 'Disabled': 'rgba(0,0,0,0.26)', + 'Hint Text': 'rgba(0,0,0,0.26)', + 'Dividers': 'rgba(0,0,0,0.12)', }, 'White': { '500': '#ffffff', + 'Text': '#ffffff', + 'Secondary Text': 'rgba(255,255,255,0.7)', + 'Icons': '#ffffff', + 'Disabled': 'rgba(255,255,255,0.3)', + 'Hint Text': 'rgba(255,255,255,0.3)', + 'Dividers': 'rgba(255,255,255,0.12)', }, }, diff --git a/dist/palette.less b/dist/palette.less index 80ff70a..2813096 100644 --- a/dist/palette.less +++ b/dist/palette.less @@ -257,7 +257,19 @@ @palette-Blue-Grey-800: #37474f; @palette-Blue-Grey-900: #263238; @palette-Black-500: #000000; +@palette-Black-Text: rgba(0,0,0,0.87); +@palette-Black-Secondary-Text: rgba(0,0,0,0.54); +@palette-Black-Icons: rgba(0,0,0,0.54); +@palette-Black-Disabled: rgba(0,0,0,0.26); +@palette-Black-Hint-Text: rgba(0,0,0,0.26); +@palette-Black-Dividers: rgba(0,0,0,0.12); @palette-White-500: #ffffff; +@palette-White-Text: #ffffff; +@palette-White-Secondary-Text: rgba(255,255,255,0.7); +@palette-White-Icons: #ffffff; +@palette-White-Disabled: rgba(255,255,255,0.3); +@palette-White-Hint-Text: rgba(255,255,255,0.3); +@palette-White-Dividers: rgba(255,255,255,0.12); .palette(@color; @shade: '500') { @colorVar: %('palette-%s-%s', replace(@color, ' ', '-'), replace(@shade, ' ', '-')); diff --git a/dist/palette.scss b/dist/palette.scss index d416c38..f8ee637 100644 --- a/dist/palette.scss +++ b/dist/palette.scss @@ -297,9 +297,21 @@ $palette: ( ), Black: ( 500: #000000, + Text: rgba(0,0,0,0.87), + Secondary Text: rgba(0,0,0,0.54), + Icons: rgba(0,0,0,0.54), + Disabled: rgba(0,0,0,0.26), + Hint Text: rgba(0,0,0,0.26), + Dividers: rgba(0,0,0,0.12), ), White: ( 500: #ffffff, + Text: #ffffff, + Secondary Text: rgba(255,255,255,0.7), + Icons: #ffffff, + Disabled: rgba(255,255,255,0.3), + Hint Text: rgba(255,255,255,0.3), + Dividers: rgba(255,255,255,0.12), ), ); diff --git a/dist/palette.styl b/dist/palette.styl index 34abe80..6c5c88f 100644 --- a/dist/palette.styl +++ b/dist/palette.styl @@ -297,9 +297,21 @@ $palette = { }, 'Black': { '500': #000000, + 'Text': rgba(0,0,0,0.87), + 'Secondary Text': rgba(0,0,0,0.54), + 'Icons': rgba(0,0,0,0.54), + 'Disabled': rgba(0,0,0,0.26), + 'Hint Text': rgba(0,0,0,0.26), + 'Dividers': rgba(0,0,0,0.12), }, 'White': { '500': #ffffff, + 'Text': #ffffff, + 'Secondary Text': rgba(255,255,255,0.7), + 'Icons': #ffffff, + 'Disabled': rgba(255,255,255,0.3), + 'Hint Text': rgba(255,255,255,0.3), + 'Dividers': rgba(255,255,255,0.12), }, } diff --git a/package.json b/package.json index afcfe14..5a506f0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "google-material-color", - "version": "1.0.0", + "version": "1.1.0", "description": "Google material color (http://www.google.com/design/spec/style/color.html) implementation for Sass, Less, Stylus, CSS and JS.", "main": "src/index.js", "scripts": { diff --git a/src/colors.js b/src/colors.js index 2786a9b..c348e1f 100644 --- a/src/colors.js +++ b/src/colors.js @@ -314,9 +314,23 @@ module.exports = { 'Black': { '500': '#000000', + + 'Text': 'rgba(0,0,0,0.87)', + 'Secondary Text': 'rgba(0,0,0,0.54)', + 'Icons': 'rgba(0,0,0,0.54)', + 'Disabled': 'rgba(0,0,0,0.26)', + 'Hint Text': 'rgba(0,0,0,0.26)', + 'Dividers': 'rgba(0,0,0,0.12)', }, 'White': { '500': '#ffffff', + + 'Text': '#ffffff', + 'Secondary Text': 'rgba(255,255,255,0.7)', + 'Icons': '#ffffff', + 'Disabled': 'rgba(255,255,255,0.3)', + 'Hint Text': 'rgba(255,255,255,0.3)', + 'Dividers': 'rgba(255,255,255,0.12)', }, } diff --git a/src/templates/test-less b/src/templates/test-less index 0fd0682..649dabd 100644 --- a/src/templates/test-less +++ b/src/templates/test-less @@ -14,3 +14,18 @@ <% }) %> <% }) %> } + +.less-text { +<% _.forIn(colors, function(shades, color) { %> + &.<%- color.replace(' ', '-') %> { + .palette('<%- color %>'); + color: @palette; + } +<% _.forIn(shades, function(hex, shade) { %> + &.<%- color.replace(' ', '-') %>-<%- shade.replace(' ', '-') %> { + .palette('<%- color %>'; '<%- shade %>'); + color: @palette; + } +<% }) %> +<% }) %> +} diff --git a/src/templates/test-page b/src/templates/test-page index 12d8e42..6f69937 100644 --- a/src/templates/test-page +++ b/src/templates/test-page @@ -33,7 +33,9 @@
stylus | +sass | +less | +css | +js | +
---|---|---|---|---|
+ palette('<%- color %>') + | ++ palette(<%- color %>) + | ++ .palette('<%- color %>') + | ++ palette-<%- color.replace(' ', '-') %> + | ++ palette.get('<%- color %>') + | +
+ palette('<%- color %>', '<%- shade %>') + | ++ palette(<%- color %>, <%- shade %>) + | ++ .palette('<%- color %>'; '<%- shade %>') + | ++ palette-<%- color.replace(' ', '-') %>-<%- shade.replace(' ', '-') %> + | ++ palette.get('<%- color %>', '<%- shade %>') + | +