fireRamp function

List<int> fireRamp(
  1. List<int> f
)

A 9-step fire ramp, white-hot down to smouldering, from an 8-step palette (dark to bright).

Implementation

List<int> fireRamp(List<int> f) => [
      f[7],
      f[6],
      f[5],
      f[4],
      f[3],
      f[2],
      f[1],
      mix(f[1], f[0], 0.5),
      f[0],
    ];