When we have gained attainments in our practice, we are able to control our death and birth. We can control when we want to die and where and when we want to take rebirth. For us to gain attainment, having a strong guru devotion is very important.
One's attainments can be seen when they pass away, some remain in meditation for days or months and their bodies do not decompose. Some, their bodies shrink and it is called Rainbow body.
------------------------------------------------------------
BY MICHAEL SHEEHY| JANUARY 28, 2019
In Tibetan Buddhism, it is said that certain meditation practices can alter the appearance of the body, transforming it into five radiant lights. The name given to this physical fluorescence is “rainbow body.”
In Vajrayana traditions of Tibetan Buddhism, tangible matter is considered to be made up of five elements: space, air, fire, water, and earth. As described in Tibetan literary sources, including The Tibetan Book of the Dead, the elemental energies that make up the cosmos are understood to be undifferentiated from those that make up the human body. Therefore, the body is simultaneously an individual person and the cosmic whole.
Certain Buddhist meditation practices are meant to alter the gravitational field of these five elements that constitute the body, transforming them into the five radiant lights of the color spectrum. The Tibetan name given to this physical fluorescence is jalu, literally meaning, “rainbow body.” Rainbow body is also the name given to the transformation of the ordinary physical body as a result of years of specific disciplined practices.
Tibetan traditions have identified signs that indicate when a practitioner has achieved rainbow body. While alive, it is said that the bodies of these beings do not cast a shadow in either lamplight or sunlight. At death, it is said that the physical body dramatically shrinks in size, exuding fragrances and perfumes rather than the odors of decomposition. A common Tibetan metric for the shrunken corpse of a rainbow body is the “length of a forearm.” Other signs are the sudden blooming of exotic plants and flowers anytime of year, as well as rainbows appearing in the sky.
There is also a special kind of rainbow body known as the “great transference into rainbow body,” or jalu powa chemo. This is the complete transference of the material body into radiance so that the only thing left of the body is hair and fingernails. While the historical origins of this phenomena are not well studied, the concept of the rainbow body is associated with the eighth-century Dzogchen meditation master Padmasambhava who, according to legend, achieved great transference and entered into a deathless state of being.
Reports from inside Tibet of rainbow bodies have emerged sporadically over the past century, though there has been an upturn of accounts over the past decades. The best known case is that of Yilungpa Sonam Namgyel, who achieved rainbow body in 1952, as recounted by Chögyam Trungpa Rinpoche in his memoir, Born in Tibet. There is also the case of Changchub Dorje, a medical doctor and leader of a Dzogchen community in the Nyarong region of eastern Tibet, about whom Chogyal Namkhai Norbu recounts in The Crystal and the Way of Light.
https://www.lionsroar.com/what-is-rainbow-body/