Matt Lishman Matt Lishman - 3 months ago 21
HTML Question

White background with md-colors


from angular material, is it possible to set the background to white without defining a custom white pallet?

I thought I could use the grey pallet because the documentation says:

background - grey (note that white is in this palette)

So I tried doing

<div md-colors="{background: 'grey-50'}">

is still only a light grey colour, not white.

I tried
<div layout-padding md-colors="{background: 'white'}">
but the white pallet doesn't seem to exist in angular material.
I get the error
angular.js:13711 mdColors: couldn't find 'white' in the palettes.
, because there is no white pallet.

Is there any way to access the white colour from the grey pallet? ( a hue, opacity etc.)

If not, is there any way to access a white colour from any other pallet using angular material?

If all else fails I could define an entire white pallet/theme and use that, but I would rather avoid doing that if there is a correct way.


You can find all palette's and their colors in the source:

It should be A100 but I have not tried it.

<div md-colors="{background: 'grey-A100'}">