---
title: "MTSky | Mobile sdk | Mobile sdk ios | Ios"
description: "Sky configuration used by map.setSky."
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# MTSky

```
public struct MTSky : Sendable, Codable, Equatable
```

Sky configuration used by `map.setSky`.

-   `[skyColor](#/s:11MapTilerSDK5MTSkyV8skyColorAA0dF5ValueOSgvp)`
    
    The base color of the sky.
    
    #### Declaration
    
    Swift
    
    ```
    public var skyColor: MTSkyColorValue?
    ```
    
-   `[skyHorizonBlend](#/s:11MapTilerSDK5MTSkyV15skyHorizonBlendAA0D11NumberValueOSgvp)`
    
    How to blend the sky color with the horizon in the \[0, 1\] range.
    
    #### Declaration
    
    Swift
    
    ```
    public var skyHorizonBlend: MTSkyNumberValue?
    ```
    
-   `[horizonColor](#/s:11MapTilerSDK5MTSkyV12horizonColorAA0dF5ValueOSgvp)`
    
    The base color at the horizon.
    
    #### Declaration
    
    Swift
    
    ```
    public var horizonColor: MTSkyColorValue?
    ```
    
-   `[horizonFogBlend](#/s:11MapTilerSDK5MTSkyV15horizonFogBlendAA0D11NumberValueOSgvp)`
    
    How to blend the fog and horizon colors in the \[0, 1\] range.
    
    #### Declaration
    
    Swift
    
    ```
    public var horizonFogBlend: MTSkyNumberValue?
    ```
    
-   `[fogColor](#/s:11MapTilerSDK5MTSkyV8fogColorAA0dF5ValueOSgvp)`
    
    The base color for the fog (requires 3D terrain).
    
    #### Declaration
    
    Swift
    
    ```
    public var fogColor: MTSkyColorValue?
    ```
    
-   `[fogGroundBlend](#/s:11MapTilerSDK5MTSkyV14fogGroundBlendAA0D11NumberValueOSgvp)`
    
    How to blend fog over the terrain in the \[0, 1\] range.
    
    #### Declaration
    
    Swift
    
    ```
    public var fogGroundBlend: MTSkyNumberValue?
    ```
    
-   `[atmosphereBlend](#/s:11MapTilerSDK5MTSkyV15atmosphereBlendAA0D11NumberValueOSgvp)`
    
    How to blend the atmosphere in the \[0, 1\] range.
    
    #### Declaration
    
    Swift
    
    ```
    public var atmosphereBlend: MTSkyNumberValue?
    ```
    
-   `[init(skyColor:skyHorizonBlend:horizonColor:horizonFogBlend:fogColor:fogGroundBlend:atmosphereBlend:)](#/s:11MapTilerSDK5MTSkyV8skyColor0E12HorizonBlend07horizonF00i3FogH003fogF00k6GroundH0010atmosphereH0AcA0dF5ValueOSg_AA0d6NumberN0OSgAmpm2Ptcfc)`
    
    Undocumented
    
    #### Declaration
    
    Swift
    
    ```
    public init(
        skyColor: MTSkyColorValue? = nil,
        skyHorizonBlend: MTSkyNumberValue? = nil,
        horizonColor: MTSkyColorValue? = nil,
        horizonFogBlend: MTSkyNumberValue? = nil,
        fogColor: MTSkyColorValue? = nil,
        fogGroundBlend: MTSkyNumberValue? = nil,
        atmosphereBlend: MTSkyNumberValue? = nil
    )
    ```
    
-   `[init(from:)](#/s:Se4fromxs7Decoder_p_tKcfc)`
    
    #### Declaration
    
    Swift
    
    ```
    public init(from decoder: any Decoder) throws
    ```
    
-   `[encode(to:)](#/s:SE6encode2toys7Encoder_p_tKF)`
    
    #### Declaration
    
    Swift
    
    ```
    public func encode(to encoder: Encoder) throws
    ```
