Skip to content

Instantly share code, notes, and snippets.

@Todd-Werelius
Todd-Werelius / mdxUtil.js
Created November 12, 2015 05:24
Angular Material Directive to Access Theme Colors
(function() {
angular.module('mdxUtil', ['ngMaterial'])
.directive('mdxPaintFg',function(mdx) {
"use strict";
return {
restrict : 'A',
link : function(scope, element, attributes) {
setRGB(element,'color',mdx.mdxThemeColors,attributes.mdxPaintFg,'mdx-paint-fg');
}