Do you need 4 houses on a colour set or 4 houses on a property to buy a hotel?
From the rules you must build up properties evenly
The player may purchase up to four houses or one hotel per property (and only if there are properties to hold the houses), which raise the rents that must be paid when other players land on the property.
The properties in a color group must be developed evenly, i.e. each house that is built must go on a property in the group with the fewest number of houses on it so far.
A hotel may be built on a color group only after all properties in the group have four houses. A player purchases a hotel by paying the price of an additional house, and returning the four houses on that property to the Bank in exchange for a hotel.