A dictionary mapping noise values to colors for use in colorizing generated noise.
- iOS 10.0+
- macOS 10.12+
- Mac Catalyst 13.0+
- tvOS 10.0+
The noise object does not store noise values or color bitmap data; instead, this property specifies a color ramp as metadata to accompany the noise object. When you later create a
GKNoise object from this noise object and use the
init(noise method to generate a texture image from the noise map, the
SKTexture class automatically uses the gradient colors from the noise map’s underlying noise objects. If you combine noise objects using the
init(component method before generating a noise map, texture generation automatically uses the color gradient corresponding to each component noise for the regions of the noise map where that noise appears.
Each key in this dictionary specifies a value in the generated noise field, and the corresponding value for that key is the color to associate with that noise value when generating textures or images from the noise field. When the
SKTexture class generates a texture image, it creates a gradient by interpolating colors for noise values in between those you specify.