# Plotly and Options (or: how to get a surface with a single color)

**URL:** <https://discourse.julialang.org/t/plotly-and-options-or-how-to-get-a-surface-with-a-single-color/12340>\
**Category:** New to Julia\
**Created:** [July 12, 2018, 7:27pm UTC](https://discourse.julialang.org/t/plotly-and-options-or-how-to-get-a-surface-with-a-single-color/12340 "2018-07-12T19:27:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [July 12, 2018, 7:27pm UTC](https://discourse.julialang.org/t/plotly-and-options-or-how-to-get-a-surface-with-a-single-color/12340/1 "2018-07-12T19:27:44Z")

</div>

I am just playing around with plotting – hard to find something handy and well documented. There’s some documentation of plot.ly – but only for Javascript and I can’t figure out how that was ported to be used within Plots.jl

I would like to draw a surface with a single color (not completely opaque but I got that):

```
using Plots
plotly()
n = 180
u = linspace(0,2*π,n);
v = linspace(0,π,n);
x = cos.(u) * sin.(v)';
y = sin.(u) * sin.(v)';
z = ones(n) * cos.(v)';
surface(x,y,z,opacity=0.5)

```

And I found nothing how to set the surface color nor how a color is specified; a html string maybe? Is there some comprehensive documentation of all options of `surface`? I couldn’t find anything, though for example for scatter plots (I would like to impose one afterwards) theres `"color" => "rgb(127, 127, 127)"`- see [3d scatter plots in Julia](https://plot.ly/julia/3d-scatter-plots/) – but how to specify that for a surface? `surfacecolor` doesn’t seem to exist, `surface_color` neither, any Dict or String approach also failed.

Any examples/ideas how to set a surface color of say `(0,0,0.7)` (in [0,1]^3) ?

---

<div class="post-metadata">

**Author:** ![BeastyBlacksmith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/beastyblacksmith/32/4741_2.png) [@BeastyBlacksmith](https://discourse.julialang.org/u/BeastyBlacksmith)\
**Post date:** [April 2, 2019, 9:32am UTC](https://discourse.julialang.org/t/plotly-and-options-or-how-to-get-a-surface-with-a-single-color/12340/2 "2019-04-02T09:32:09Z")

</div>

Just facing the same problem. I hope there are better solutions, but here is my workaround:

```julia
using Plots, Colors
plotly()
const_color = cgrad( [RGB{Float64}(0.5,1,0.5) for _ in 1:2] )
surface( x, y, z, color = const_color )

```
