Contextual button color?

Is there a way programmatically to have a button, hooked to a DB, to show a different color if the collection table has no value for that button? e.g. right now, a user input button reflects the amount of tiger tanks as 2 in the collection, but the input button shows the same color for a data item that has no data in it (it has zero Panzer II tanks for instance). Can the button color be red if there is no value such as it does if the button is set to being “required” eg it shows Red if required. Can it show Red if the button is has no value?