Soak 2 cups of basmati rice in water for 30 minutes.
While the rice is soaking, heat 2 tablespoons of ghee or oil in a pan and sauté sliced onions, minced garlic, grated ginger, cinnamon sticks, star anise, cardamom pods, and pandan leaf to make a flavorful blend.
In a large pot or pressure cooker, add the soaked rice, the sautéed spice mixture, 3 cups of water, and a half-teaspoon of salt. Stir well to combine.
Bring to a boil, then reduce heat to low, cover, and cook for about 20-25 minutes until the rice is tender and fully cooked (adjust based on your pressure cooker or stove).
Remove from heat and let it sit covered for 10 minutes. Add a few drops of yellow food coloring if using as a saffron substitute.
Fluff the rice with a fork, sprinkle cumin seeds, pomegranate seeds, chopped peanuts, and more sautéed onions (optional) on top.
Serve immediately or keep warm until ready to serve.