I believe that you will need to make palettes both for black and white. For instance:
angular.module('myApp', ['ngMaterial']) .config(function($mdThemingProvider) { $mdThemingProvider.definePalette('black', { '50': '000000', '100': '000000', '200': '000000', '300': '000000', '400': '000000', '500': '000000', '600': '000000', '700': '000000', '800': '000000', '900': '000000', 'A100': '000000', 'A200': '000000', 'A400': '000000', 'A700': '000000', 'contrastDefaultColor': 'light' }); $mdThemingProvider.definePalette('white', { '50': 'ffffff', '100': 'ffffff', '200': 'ffffff', '300': 'ffffff', '400': 'ffffff', '500': 'ffffff', '600': 'ffffff', '700': 'ffffff', '800': 'ffffff', '900': 'ffffff', 'A100': 'ffffff', 'A200': 'ffffff', 'A400': 'ffffff', 'A700': 'ffffff', 'contrastDefaultColor': 'dark' }); $mdThemingProvider.theme('default') .primaryPalette('black') .backgroundPalette('white'); });
Naturally, you can display the rest of each palette. It should be noted that "contrastDefaultColor" is essential for the correct color of the text in each case. In addition, unfortunately, it seems that you need to define the entire color palette. Another option, if you do not want to create completely new palettes, is to expand the existing palette:
var blackPalette = $mdThemingProvider.extendPalette('grey', { '500': '000000' }); $mdThemingProvider.definePalette('black', blackPalette);
https://material.angularjs.org/latest/Theming/03_configuring_a_theme