Text selection is indicated by highlighting a contiguous segment of text. On mobile, a selection handle is added to both the beginning and end of a selection and the actions related to the text appear in a dropdown menu positioned immediately above, but not overlapping, the selection.
The selection colors follow the current theme colors, using the accent hue, and you don't need to configure anything to make it work. Go ahead and select any text to see it's background color:
This text will follow the default color of the documentation, which is a nice red color.
This one will get a slick black background when selected, because the parent theme have another color.
Also works when the theme is dark.