# fsMapViewSetAltitudeColorList This function can be used to set an array of colour structs which will then be used when the `fsMapViewSetViewMode` is set to "Altitude" mode. The colour struct at index 0 of the array will be used to colour from {{< glossterm >}}msl{{< /glossterm >}} to the given minimum value, and then the colours from index 1 to index `nColor`, will be used linearly up to the maximum altitude (see `fsMapViewSetAltitudeRange` for more information).     ##### Syntax ``` wasm bool fsMapViewSetAltitudeColorList( FsContext ctx, FsTextureId id, FsColor* colors, unsigned nColors ) ```   ##### Members {{< table-wrapper >}} | Parameters | Description | |------------|---------------------------------------------------------------------------------------| | `ctx` | A value of type `FsContext` provided as an argument of the gauge callback. | | `id` | The MapView render ID as returned by the function `fsMapViewCreate`. | | `colors` | An array containing a minimum of 2 `FsColor` structs, up to a maximum of 128 structs. | | `nColors` | The total size of the colour array. | {{< /table-wrapper >}}   ##### Return Values Returns false if: - `nColors` < 2 or if `nColors` > 128 - no texture matches the given MapView ID - the `ctx` is invalid Otherwise it will return true.   ##### Remarks The colors array is made up of at least 2 `FsColor` structs and would be created and used as shown in the following example: ``` wasm const int size = 4; FsColor colors[size] = { { 1.f, 0.7f, 0.25f, 0.1f }, { 0.7f, 0.2f, 0.63f, 0.88f }, { 0.8f, 0.3f, 0.7f, 0.62f }, { 0.f, 0.9f, 1.f, 1.f } } fsMapViewSetAltitudeColorList(ctx, mapID, colors, size); ```