Create a new document, enter text, and see the color in the picture
Select the text selection, ctrl+shift+C to merge the copies, create a new layer, ctrl+V to paste
Add the following layer style to this layer.
Select the text layer, ctrl+shift+C to merge the copies, create a new layer, ctrl+V to paste, ctrl+U, adjust the brightness to the brightest, the text will be white at this time
Add a layer mask and fill it all with black