How to colour min/max value?

Please help me out with this.
I like to colour the values Min/Max.

type: entities
entities:
  - entity: sensor.mi_seplos_multi_bms_bms0_cell_1
  - entity: sensor.mi_seplos_multi_bms_bms0_cell_2
  - entity: sensor.mi_seplos_multi_bms_bms0_cell_3
  - entity: sensor.mi_seplos_multi_bms_bms0_cell_4
  - entity: sensor.mi_seplos_multi_bms_bms0_cell_5
  - entity: sensor.mi_seplos_multi_bms_bms0_cell_6
  - entity: sensor.mi_seplos_multi_bms_bms0_cell_7
  - entity: sensor.mi_seplos_multi_bms_bms0_cell_8
  - entity: sensor.mi_seplos_multi_bms_bms0_cell_9
  - entity: sensor.mi_seplos_multi_bms_bms0_cell_10
  - entity: sensor.mi_seplos_multi_bms_bms0_cell_11
  - entity: sensor.mi_seplos_multi_bms_bms0_cell_12
  - entity: sensor.mi_seplos_multi_bms_bms0_cell_13
  - entity: sensor.mi_seplos_multi_bms_bms0_cell_14
  - entity: sensor.mi_seplos_multi_bms_bms0_cell_15
show_header_toggle: true
state_color: true
card_mod:
  style:
    "#states": >
      div > div:nth-child({{-
      states('sensor.mi_seplos_multi_bms_bms0_min_cell_voltage') -}}) {
        color: red;
      }  

      div > div:nth-child({{-
      states('sensor.mi_seplos_multi_bms_bms0_max_cell_voltage') -}}) {
        color: deepskyblue;
      }
    hui-sensor-entity-row:
      $ hui-generic-entity-row:
        $: |
          state-badge {
            display: none;
          }
          .info {
            padding-left: 0px !important;
          }

Please review this thread

and post questions in that thread

An example, but based off your card_mod code it is hard to understand what you trying to achieve.

type: entities
show_header_toggle: true
state_color: true
entities:
  - entity: sensor.living_room_humidity
    card_mod:
     style:
      hui-generic-entity-row:
        $: |
         .text-content:not(.info) {
            color: cyan;
            font-weight: bold;
          }      

If you are trying to template indexes in nth-child - ok, this is possible (with valid jinja templates of course - which seems to be NOT in your case), but suggest to start with simpler examples which were already posted above.

I want to compare all cell voltages with entities: min-voltage and max_voltage.
If true, do color that specifick cell equal to min/max voltage entitie.