Script not loading

I am getting a configuration issue with a script in my scripts.yaml. It is not being loaded into the scripts list but I cannot see an obvious issue. It is almost identical to a script written by another devloper at [Home Assistant Rainbow Loop with Ikea Tradfri RGB light · GitHub]. What this does is allow an automation to scroll through a list of colours and tur on a light with each color value.

In fact, I have simply taken this and used rgb values where it was originally xy colour coordinates.

My code is below:

sufclight:
  alias: sufc light
  mode: single
  fields:
    entity:
      description: The entity that will be faded through
      example: light.hue_lightstrip
  variables:
    colors: |-
      {{ [[237, 28, 36], [238, 41, 48], [239, 53, 60], [240, 66, 72], [241, 78, 85], [242, 91, 97], [243, 104, 109], [244, 116, 121],
      [245, 129, 133], [246, 141, 145], [247, 154, 158], [248, 167, 170], [249, 179, 182], [250, 192, 194], [251, 205, 206],
      [252, 217, 218], [253, 230, 231], [254, 242 243], [255, 255 255], [254, 242 243], [253, 230, 231], [252, 217, 218],
      [251, 205, 206], [250, 192, 194], [249, 179, 182], [248, 167, 170], [247, 154, 158], [246, 141, 145], [245, 129, 133],
      [244, 116, 121], [243, 104, 109], [242, 91, 97], [241, 78, 85], [240, 66, 72], [239, 53, 60], [238, 41, 48]] }}
  sequence:
    - service: light.turn_on
      data_template:
        rgb_color: |
          {{  colors[(now().second/3.5)|round(0)] }}
        transition: 1
        entity_id: '{{ entity }}'

What mistake have I made?

I am not sure that this is causing your problem of the script not loading, but I think there is an issue with how you select the different RGB values.
Your current RGB array contains 36 different values, but your function only gives 18 different values (0 to 17).
Your current colors function works like this: for every second the second value is divided by 3.5 and then rounded to zero digits. This means that the outcome can only be between 0 (0/3.5) and 17 (59/3.5).
To get access to all 36 values ( 0 to 35) you can change the divider to 1.68 (59/36).
So I think it should be:

{{ colors[(now().second/1.68)|round(0)] }}

I must admit I thought I had that divisor with the wrong value. Makes sense now. Thanks for that, I will correct it. However, I cannot see that causing the script to be faulty and not loaded, as it would just pick the fewer values.

Ok, couple of missing commas plus every number in the data list needs quotes around it, to treat it as a text field, not integer.

The script is now loaded. Doesn’t do what I want it to do (nothing seemed to happen at all when it was called every second - no change to the lightstrip so I will probably have to try some simplified version to see if the rgb is an issue) but at least I have moved on a bit.

sufclight:
  alias: sufc light
  mode: single
  fields:
    entity:
      description: The entity that will be faded through
      example: light.hue_lightstrip
  variables:
    colors: |-
      {{ [['255', '255', '255'], ['237', '28', '36'], ['238', '41', '48'], ['239', '53''', '60'], ['240', '66', '72'], ['241', '78', '85'], ['242', '91', '97'], ['243', '104', '109'], ['244', '116', '121'],
      ['245', '129', '133'], ['246', '141', '145'], ['247', '154', '158'], ['248', '167', '170'], ['249', '179', '182'], ['250', '192', '194'], ['251', '205', '206'],
      ['252', '217', '218'], ['253', '230', '231'], ['254', '242', '243'], ['255', '255', '255'], ['254', '242', '243'], ['253', '230', '231'], ['252', '217', '218'],
      ['251', '205', '206'], ['250', '192', '194'], ['249', '179', '182'], ['248', '167', '170'], ['247', '154', '158'], ['246', '141', '145'], ['245', '129', '133'],
      ['244', '116', '121'], ['243', '104', '109'], ['242', '91', '97'], ['241', '78', '85'], ['240', '66', '72'], ['239', '53', '60'], ['238', '41', '48']] }}
  sequence:
    - service: light.turn_on
      data_template:
        rgb_color: |
          {{  colors[(now().second/1.68)|round(0)] }}
        transition: 1
        entity_id: '{{ entity }}'

All working now. final fix was to put quotes around the data flow where the rgb_colour is actually applied.