# Coloring regions defined with path in Luxor

**URL:** https://discourse.julialang.org/t/coloring-regions-defined-with-path-in-luxor/110863
**Category:** Visualization
**Tags:** question, luxor
**Created:** [February 27, 2024, 10:08pm UTC](https://discourse.julialang.org/t/coloring-regions-defined-with-path-in-luxor/110863 "2024-02-27T22:08:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Janis\_Erdmanis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/janis_erdmanis/32/10869_2.png) [@Janis\_Erdmanis](https://discourse.julialang.org/u/Janis_Erdmanis)
#### Post date: [February 27, 2024, 10:08pm UTC](https://discourse.julialang.org/t/coloring-regions-defined-with-path-in-luxor/110863/1 "2024-02-27T22:08:20Z")

</div>

I am working on a new logo for the PeaceFounder project and giving Luxor a chance. So far, I have managed to get a frame in the way I want it to be (representing two interlinked elements in a rope):

 ![Untitled2](https://global.discourse-cdn.com/julialang/original/3X/6/d/6d609d2ef02172c1c111f840563e048967ff602f.png)  
which is achieved with the following code:

```julia
using Luxor

w = 8

background("black")
sethue("white")
setline(w)
	
A = Point(-50, 0)
B = Point(50, 0)
C = Point(50, -100)
D = Point(150+w/2, -100)
F = Point(-50, +100)
E = Point(-150-w/2, +100)
	
carc2r(B, C, A, :stroke)
carc2r(A, F, B, :stroke)
carc2r(C, B, D, :stroke)
carc2r(F, A, E, :stroke)

line(A, B, :stroke)
line(E, F, :stroke)
line(C, D, :stroke)

```

As a next step, I want to explore colouring the two closed regions with a colored gradient, providing spatial dimension. However, I need help to define the area that can be coloured. This seems very simple, and I see examples making use of that, but over the evening, I haven’t managed to progress on the issue.

---

<div class="post-metadata">

### Author: ![Janis\_Erdmanis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/janis_erdmanis/32/10869_2.png) [@Janis\_Erdmanis](https://discourse.julialang.org/u/Janis_Erdmanis)
#### Post date: [February 28, 2024, 12:31am UTC](https://discourse.julialang.org/t/coloring-regions-defined-with-path-in-luxor/110863/2 "2024-02-28T00:31:33Z")

</div>

I eventually I found the relevant place in the documentation: [Luxor.jl/docs/src/explanation/pathspolygons.md at master · JuliaGraphics/Luxor.jl · GitHub](https://github.com/JuliaGraphics/Luxor.jl/blob/master/docs/src/explanation/pathspolygons.md) which helped me to produce:

```julia
using Luxor

function make_path()

    A = Point(-50, 0)
    B = Point(50, 0)
    C = Point(50, -100)
    D = Point(150+w/2, -100)

    move(A)
    line(B)
    carc2r(C, B, D)
    line(C)
    carc2r(B, C, A)

end

Drawing(600, 600, "filled_triangle.png")
origin(Point(300, 300)) # Set the origin to the center of the drawing area
background("antiquewhite")

sethue("orange")
make_path()
fillpath()

sethue("purple")
translate(-100, +100)
make_path()
fillpath()

finish()

```

 ![filled_triangle](https://global.discourse-cdn.com/julialang/original/3X/7/8/7849521b0d60c75aae20ff069771509f2f7fa1d5.png)
