# Blending colours of overlapping lines with lighten mode

**URL:** https://discourse.julialang.org/t/blending-colours-of-overlapping-lines-with-lighten-mode/117291
**Category:** Visualization
**Tags:** question, plotting, makie
**Created:** [July 21, 2024, 9:05am UTC](https://discourse.julialang.org/t/blending-colours-of-overlapping-lines-with-lighten-mode/117291 "2024-07-21T09:05:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![BenCichos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bencichos/32/209633_2.png) [@BenCichos](https://discourse.julialang.org/u/BenCichos)
#### Post date: [July 21, 2024, 9:05am UTC](https://discourse.julialang.org/t/blending-colours-of-overlapping-lines-with-lighten-mode/117291/1 "2024-07-21T09:05:38Z")

</div>

I want to plot Rays with multiple colours in Makie. Sometimes these rays might overlap each other, for example when I want to show light diffraction from a prism, I would want to represent a white ray but made out of multiple wavelengths, i.e. multiple colours. When plotting multiple lines above each other in Makie, with transparency set to true the line becomes black. I was just wondering if there is a way to change this behaviour such that the colours lighten when drawn on top of each other.

```julia
using GLMakie
using Colors: RGBA

f = Figure()
ax = Axis(f[1, 1])
rays = [(Point(0.0, 0.0), Point(1.0, 1.0)) for _ in 1:50]
ray_colors = [RGBA(rand(), rand(), rand(), 1.0) for _ in 1:50]
linesegments!(ax, rays, color=ray_colors, transparency=true)
display(f)

```

Here is some example code where I would want the line that is plotted to be white or a light color in the end. Is there any setting for this in Makie?
