Hello, how can I use ps to change black characters on a white background into white characters on a red background?

Use the clipping mask: create a layer between the background layer and the text layer, the color is red, right-click the layer to create the clipping mask, and the bottom will turn red; Create a layer on top of the text layer, paint it white, right-click the layer menu, create a clipping mask, and the text will turn white. Then merge the visible layers.