--- layout: example.html title: NDVI with a Dynamic Color Ramp shortdesc: NDVI from a COG with a dynamic color ramp docs: > The GeoTIFF layer in this example draws from two Sentinel 2 sources: a red band and a near infrared band. The layer style includes a `color` expression that calculates the Normalized Difference Vegetation Index (NDVI) from values in the two bands. The `interpolate` expression is used to map NDVI values to colors. The "stop" values for the color ramp are derived from application provided style variables. Using the inputs above, the min and max colors and values can be adjusted. The `layer.updateStyleVariables()` method is called to update the variables used in the interpolated color expression. tags: "cog, ndvi" resources: - https://cdnjs.cloudflare.com/ajax/libs/chroma-js/2.1.2/chroma.min.js ---

Min NDVI |  |  |
Max NDVI |  |  |