Skip to content

Instantly share code, notes, and snippets.

@ayozebarrera
Forked from rileyjshaw/materialAccents.js
Created December 12, 2016 18:38
Show Gist options
  • Save ayozebarrera/a419a9290775dd0946701635d6b54418 to your computer and use it in GitHub Desktop.
Save ayozebarrera/a419a9290775dd0946701635d6b54418 to your computer and use it in GitHub Desktop.
Return an array of accent colors from Google's [Material Design guide](http://www.google.com/design/spec/style/color.html)
[].filter.call(document.querySelectorAll('.color-group .color'), function(el) {
return el.querySelector('.shade').textContent === 'A400';
}).map(function (el) {
return el.querySelector('.hex').textContent;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment