Initializes a texture that creates a vertical gradient between two color temperatures.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- Model I/O
The black-body color temperature, in Kelvins, at the top of the gradient.
The black-body color temperature, in Kelvins, at the bottom of the gradient.
nameproperty for the new texture object.
The texel dimensions (width and height) of the texture image.
A new color swatch texture object.
Real-world light sources often measure color of illumination based on a black-body temperature scale. For example, the colors and characterizations of typical home and office light fixtures correspond to the following temperatures:
Warm, yellowish white
Pale yellowish white
Bright, slightly greenish white
Bright, slightly bluish white
This initializer does not generate texel data; the
MDLColor class automatically generates data and caches it for reuse when you use one of the
MDLTexture methods listed in Accessing Texture Data.