Its a simple task i want to pass on the color eg: "rgb(255,255,0)" to the html file so that the text color can be changed.
I used this snippet in the html file
``{% for i in range(0,len) %}
new mapboxgl.Marker({
color: {{ colors[i]|safe }}
}).setLngLat([
{{ lang[i] }},
{{ lat[i] }}])
.addTo(map);
{%endfor%}
i am passing the colors list by:
colors=[]
maxValue = max(totalConfimedList)
for item in totalConfimedList:
print(item)
# colors.append(code_map(int(item),0,int(maxValue),0,255))
if int(item) >255:
colors.append("\'rgb(255,0,0)")
continue
colors.append("\"rgb("+item+"0,0)\"")
In HTML IN CHROME it is coming as color: "rgb(200,0)"
The color is not coming. Please help me