Notifications have black and white colors - why are they both colors? Currently as of Android 5.0.1 update my Nexus 7 2013 shows black and white notifications. I see no logic in the colors and it does not really look very good as well. Why is that? Is this a bug? Intention? If intention, what is it showing? 

And while we are at it, what is the line that separates the notifications? The weather one is persistent and so is twilight, so it does not separate persistent notifications.
The colour

I believe the background colour of each notification depends on the app that added it, I think the default is white for 'stock' Android.

The line

This is to separate the different levels of priority for notifications. I expect the Twilight one is set to lowest priority (MIN) whereas the weather one will likely have a higher priority (MAX). Whilst some apps do allow you to specify the priority, most will just set what the believe to be most appropriate. Google does provide guidelines on how to choose the appropriate priority to help developers in this regard.