from __future__ import annotations

from planemapper.constants import ALTITUDE_BANDS_FT, ALTITUDE_COLOURS


def altitude_to_colour(altitude_ft: int) -> tuple[int, int, int]:
    for i, band in enumerate(ALTITUDE_BANDS_FT):
        if altitude_ft <= band:
            return ALTITUDE_COLOURS[i]
    return ALTITUDE_COLOURS[-1]
