Control opacity of color within scatter marker when color is set to an array?

I am trying to keep the outline of the marker fully opaque while having the fillcolor semi-opaque for my scatterplot markers (similar to example 3 in the following link [https://plot.ly/~alex/455/four-ways-to-change-opacity-of-scatter-markers.embed]). I have a colorbar in my scatterplot and have set the color to equal an array for the colorbar - not sure how to incorporate the opacity value into the color specification when assigning an array rather than ‘rgb(…,…,…,0.5)’ like in the documentation. My code:

marker = dict(symbol=5, 
              size=10,
              line=dict(width=1),
              colorbar=dict(                                                        
                            title='(V<sub>f</sub>/V<sub>0</sub> = 1/COC)',
                            nticks=12,
                            len=0.6,
                            y=0.7),
              colorscale = 'Portland',
              cmin=0,
              cmax=1,
              color = frac_monthly, #Not sure how to incorporate the value for opacity here
              showscale=True
              )

Hi @spencerchad,

I don’t think there’s a way to separate the opacity of the marker fill from the marker line, other than specifying the fill as an rgba value like you’ve already discovered. Here is an existing Plotly.js issue that discusses this use case.

One work-around would be to use two separate scatter traces. The first with no outline, colored by the colorscale and opacity set to something less than 1. and the second with the same x, y, and marker.size but with a color of black and a marker.symbol of 'circle-open', which will result in a marker with no fill at all.

Hope that helps clear things up a bit,
-Jon