Set background color of the material chip programmatically
You can set background color of material chip by following line (Kotlin)
chip.chipBackgroundColor = getColorStateList(/*your preferred color*/)
For Kotlin, you should use this:
chip.chipBackgroundColor = ColorStateList.valueOf(ContextCompat.getColor(context, R.color.yourColor))
For Java:
chip.setChipBackgroundColor(ColorStateList.valueOf(ContextCompat.getColor(context, R.color.yourColor)));