A common type of disappearing ink is based on an acid-base indicator called thymolphthalein. This is a molecule that absorbs visible light when it is in an alkaline solution, and becomes colorless in a neutral or acidic solution.
To turn it into a blue ink, we add sodium hydroxide (lye), a strong alkali. As long as the solution is basic (alkaline), it will be blue.
But if we allow the ink to soak into paper or cloth, so that there is a lot of surface area in contact with the air, it will absorb carbon dioxide from the air. Carbon dioxide mixes with water to form carbonic acid (the bubbly ingredient in soda pop). The acid neutralizes the lye, forming sodium carbonate (washing soda).
The neutral solution is no longer blue, but colorless. You can make it blue again by adding an alkali, such as baking soda or ammonia (or more lye).