As a final task, let's style our suitability raster layer. We should use the same color ramp that QGIS calculated for us. That is, we have five breakpoints: 0, 0.25, 0.5, 0.75, and 1. The color ramp is red to green, with the colors #ff0000, #fdae61, #ffffc0, #a6d96a, and #1a9641 at the breakpoints:
- Create a new CSS style restricted to our workspace with an automatically generated raster template. Save the style, reopen it, and preview it on our suitability layer.
- Single-band rasters can be styled in CSS just like in SLD--with a color map. The syntax of the color map is a bit unusual, though. The property is raster-color-map, while the value is a set of color-map-entry functions separated by whitespaces. As a one ...