I delved into the sources of Snackbar, and this is what I found, the Snackbar background consists of 2 layers: the base and overlay, the colors of which are mixed.
To specify these colors, simply add themes 2 to your options:
colorSurface - background color, default = 0xFFFFFFFF
colorOnSurface - overlay, default = 0xFF000000
Thus, in the default case, we get the color 0xFF333333, which is located in the middle between white and black.
Have fun mixing and styling your Snackbar :)
Arthur matsegor
source share