How can I change the color of trendline?

You can also use the approach in Plotly Express Trendlines, just the Lines to target other properties than the line color. There happens to be a dedicated keyword argument for this one but using .update_traces() you can batch-update any property of any trace matching any selector