Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the default color of the dialog background fill?

When Android AlertDialog shows, the background around this dialog becomes darker. This is probably achieved by first filling the whole screen with a half-transparent color and then putting a dialog on top of that.

My question is: what is the default color of that background fill?

#88666666 //looks close, but not enough
like image 947
activity Avatar asked Oct 09 '15 10:10

activity


2 Answers

For future readers:

What question author calls dialog background fill is called Scrim in Material Design spec.

So the scrim color according to Material Design Spec is

Color : #000000

Opacity : 32%

    <color name="background">#52000000</color>
like image 160
user158 Avatar answered Oct 09 '22 00:10

user158


If you check the AppCompat's Dialog I believe it is using:

<color name="dim_foreground_disabled_material_dark">#80bebebe</color>
<color name="dim_foreground_disabled_material_light">#80323232</color>

However on my own testing I think it's #99000000 (black at 62 % opacity)

like image 37
tir38 Avatar answered Oct 09 '22 01:10

tir38