`Plotly.validate()` throws and exception if either `paper_bgcolor` or `plot_bgcolor` is in the layout. Example: https://jsfiddle.net/tbitai/ohm5cuwr/