Wash and soak rice for 15 mins. Cook and keep it aside.
Wash and chop the onions finely.
Heat a nonstick pan with oil. Temper with mustard, Urad dal, curry leaves, chana dal, and groundnuts. Saute for a couple of mins.
Then, add the chopped onions. Saute well till the onions are done. Then, add the red chili powder, turmeric powder and combine everything well. Simmer for few mins.
Finally, add the cooked rice and combine everything well.
Onion rice is ready to be served.