def _substepping_color(substepping_depth):
    """Choose a color for the substepping depth text."""
    if substepping_depth >= 1000:
        return 'red'
    elif substepping_depth >= 100:
        return '#FF7700'
    elif substepping_depth >= 10:
        return 'green'
    else:
        return 'blue'
