Gauge Card: how to get a gradually changing color?

sure its very easy, just add the complete yaml in your secret, and import it like you would do with a regular !include, only now with !secret:

# in gauge card:

segments: !secret gauge_segments_battery

# in secrets.yaml

gauge_segments_battery:
  - from: 0
    color: '#FF453A'
  - from: 2.5
    color: '#FF4C34'
  - from: 5
    color: '#FF542E'
  - from: 7.5
    color: '#FF5C28'
  - from: 10
    color: '#FF6422'
  - from: 12.5
    color: '#FF6C1D'
  - from: 15
    color: '#FF7317'
  - from: 17.5
    color: '#FF7B11'
  - from: 20
    color: '#FF830B'
  - from: 22.5
    color: '#FF8B05'
  - from: 25
    color: '#FF9300'
  - from: 27.5
    color: '#FF9D00'
  - from: 30
    color: '#FFA700'
  - from: 32.5
    color: '#FFB200'
  - from: 35
    color: '#FFBC00'
  - from: 37.5
    color: '#FFC700'
  - from: 40
    color: '#FFD100'
  - from: 42.5
    color: '#FFDB00'
  - from: 45
    color: '#FFE600'
  - from: 47.5
    color: '#FFF000'
  - from: 50
    color: '#FFFB00'
  - from: 52.5
    color: '#F4F709'
  - from: 55
    color: '#EAF313'
  - from: 57.5
    color: '#DFEF1C'
  - from: 60
    color: '#D5EB26'
  - from: 62.5
    color: '#CAE72F'
  - from: 65
    color: '#C0E339'
  - from: 67.5
    color: '#B5DF42'
  - from: 70
    color: '#ABDB4C'
  - from: 72.5
    color: '#A0D755'
  - from: 75
    color: '#96D35F'
  - from: 77.5
    color: '#8DCD5C'
  - from: 80
    color: '#85C85A'
  - from: 82.5
    color: '#7DC357'
  - from: 85
    color: '#75BE55'
  - from: 87.5
    color: '#6DB953'
  - from: 90
    color: '#64B450'
  - from: 92.5
    color: '#5CAF4E'
  - from: 95
    color: '#54AA4B'
  - from: 97.5
    color: '#4CA549'
  - from: 100
    color: '#44A047'