def get_colourstate_nbr(visibility, cloudbase):
    """Returns the colour state for a given cloud base (in ft) and visibility (in metres). A single digit is also
    returned alongside the colour state to assist in colour state comparisons where 7=BLU, 6=WHT, 5=GRN, 4=YLO1, 3=YLO2,
    2=AMB, 1=RED
    :param cloudbase:
    :param visibility:
    """
    colourstate_nbr = 1
    colourstate = 'RED'
    if visibility < 800 or cloudbase < 200:
        colourstate_nbr = 1
        colourstate = 'RED'
    elif visibility < 1600 or cloudbase < 300:
        colourstate_nbr = 2
        colourstate = 'AMB'
    elif visibility < 2500 or cloudbase < 500:
        colourstate_nbr = 3
        colourstate = 'YLO2'
    elif visibility < 3700 or cloudbase < 700:
        colourstate_nbr = 4
        colourstate = 'YLO1'
    elif visibility < 5000 or cloudbase < 1500:
        colourstate_nbr = 5
        colourstate = 'GRN'
    elif visibility < 8000 or cloudbase < 2500:
        colourstate_nbr = 6
        colourstate = 'WHT'
    elif visibility > 7999 and cloudbase > 2499:
        colourstate_nbr = 7
        colourstate = 'BLU'
    return colourstate_nbr, colourstate
