This is down to, in part, a lack of telltale symptoms before a tumour spreads.

Scientists hope the ability to detect signs of jaundice when bilirubin levels are minimally elevated - but before they're visible to the naked eye - could create a new screening program for people at risk of the disease.

So far the app works best in a 3-D printed box that blocks out ambient lighting but scientists are working to improve it

In a clinical study of 70 patients the BiliScreen app correctly identified cases for concern 89.7 per cent of the time compared to the blood test currently used.

In adults, the whites of the eyes are more sensitive than skin to changes in bilirubin levels, which can be an early warning sign for pancreatic cancer, hepatitis or the generally harmless Gilbert's syndrome.

Unlike skin colour, changes in the sclera are more consistent across all races and ethnicities.

Yet by the time people notice the yellowish discoloration in the sclera, bilirubin levels are already well past cause for concern.

Lead author Shwetak Patel, of the University of Washington, said: "The eyes are a really interesting gateway into the body - tears can tell you how much glucose you have, sclera can tell you how much bilirubin is in your blood.

"Our question was: Could we capture some of these changes that might lead to earlier detection with a selfie?"

BiliScreen uses a smartphone's built-in camera and flash to collect pictures of a person's eye as they snap a selfie

The team developed a computer vision system to isolate the white parts of the eye.

The app then calculates the colour information from the sclera based on the wavelengths of light that are being reflected and absorbed.

It then correlates it with bilirubin levels using algorithms already programmed into the app.

To account for different lighting conditions, the team tested BiliScreen with two different accessories; paper glasses printed with coloured squares to help calibrate colour and a 3-D printed box that blocks out ambient lighting.