Thank you.
I've just found a solution
, adapting this code somewhere found here, initially made to change text-on colors in a switch :
JS{{
var colors = ["transparent", "green", "green", "orange"]
var css = ''
for (var i = 0; i < colors.length; i++) {
css += "value:nth-child(" + (i+1) + "){--color-text-on:" + colors[i] + ";}\n"
}
return css
}}
To that :
JS{{
var colors = ["purple", "green", "red", "orange"]
var css = ''
for (var i = 0; i < colors.length; i++) {
css += ".item:nth-child(" + (i+1) + "){background:" + colors[i] + ";}\n"
}
return css
}}
It works well with 4 values... now let's go for the 29... hmm... 30, i forgot 1 ! 
However, i'll try to adapt it again, in order to avoid writing ["blue","blue","blue","blue","red","red","red","red",...] 
@jean-emmanuel, if you read me : in this case, what's the difference between value:nth-child...
and .item:nth-child...
?... some chance lead me to this, but i'd like to understand better
Thank you
Edit: done... Here is my final step (unless there's some better way to do - I think here that the var colors is useless... just have to write it directly after "background") :
Edit Edit : Yep... works well too this way... :
JS{{
var css = ''
for (var i = 0; i < 3; i++) {
css += ".item:nth-child(" + (i+1) + "){background:" + "purple" + ";}\n"
}
for (var i = 3; i < 6; i++) {
css += ".item:nth-child(" + (i+1) + "){background:" + "green" + ";}\n"
}
for (var i = 6; i < 17; i++) {
css += ".item:nth-child(" + (i+1) + "){background:" + "red" + ";}\n"
}
for (var i = 17; i < 25; i++) {
css += ".item:nth-child(" + (i+1) + "){background:" + "orange" + ";}\n"
}
return css
}}
@jean-emmanuel again : what do mean those syntaxes " + ... +"
and \n
and +=
???