What is the difference between UI and UX?

In this UI which is chosen in coding time like dropdowns, buttons, and images then the user experience is best. Whereas UX means which button is used then the color chosen for the user experience is more than two colors this is decided by the UX developers. But the UI is decided as the only user interaction.