fun getBackgroundColor(view: View): Int {
var bgColor = Color.parseColor("#000000")
if (view.background is ColorDrawable) {
val colorDrawable = view.background as ColorDrawable
bgColor = colorDrawable.color
}
return bgColor
}