Recursively calculate colour of child