How can I use the LEGO distance and color sensor from Power Up with the LEGO Mindstorms EV3?
They are somewhat compatible. The EV3 has 5V on pin 4 of the input ports while Powered Up has 3.3V on pin 4. So there is a potential that the sensor cannot handle 5V and could be damaged.
Other than that, the pins are the same, so you could cut the cable on the sensor and splice it with an EV3 cable or buy a 3rd party extension cable (example) so that you don't damage your sensor.
The EV3 doesn't support output commands for UART sensors, so you won't be able to use the color output mode or the infrared output mode (this might be possible with ev3dev though).