button background color html code example
Example 1: html change button color
.button {
background-color: #A62773; /*Color Code*/
}
Example 2: elevated button background color
ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith<Color>(
(Set<MaterialState> states) {
if (states.contains(MaterialState.pressed))
return Colors.green;
return null; // Use the component's default.
},
),
),
)