Skip to content

Commit 0a94028

Browse files
committed
Update gradient.jl
1 parent bae7efe commit 0a94028

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/gradient.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
"""
2+
gradient(colors...; direction = [0,1,0,0])
3+
4+
A linear gradient interpolates colors along a line, from a starting point to an ending point. By default a linear gradient runs horizontally, from left to right. Use the direction to configure the gradient direction, e.g. [0,0,0,1] runs the gradient vertically. All coordinates are defined in a normalized [0, 1] coordinate space, relative to the bounding box of the item being colored.
5+
6+
## Examples
7+
```julia
8+
gradient()
9+
gradient(:red, :white, :blue)
10+
```
11+
"""
112
function gradient(args...; direction = [0,1,0,0])
213
res = Dict{Symbol, Any}()
314
res[:gradient] = :linear

0 commit comments

Comments
 (0)