I have a TextFrame: abcd
i want to set Background Color of Text "bc" is Red
How set Background Color of Text?
Not clear what you are trying to do, but most likely you will want to create and apply a character style that either adds a custom underline (to give you a block of color behind the characters) or assigns a different character fill color to change the color of the glyphs themselves.
If there is a recognizable pattern to the characters, or to where they appear in a paragraph, you can probably apply this style automatically as a nested style or GREP style.
That would be done with a custom underline. Set the style to solid, pick a color, and adjust the weight and offset of the underline to make it thick and move up behind the text.