Abstract: A method and an arrangement of measuring acidity or other chemical or physical property of a gas. The invention comprises a membrane having optical indicator molecules bound to a microporous matrix arranged to be placed into contact with the gas to be measured, the optical indicator molecules changing their colour in response to the acidity or other chemical or physical property of the gas, a light source, and a detector. The light source is arranged to emit and direct light to the membrane, the light being transmitted through the membrane, whereby a part of the light is absorbed into the optical indicator molecules, and the rest of the light emitted is guided to the detector, where it is measured.