# DomainColoring(Toy) directly from the 2-D FFT of an image

**URL:** https://discourse.julialang.org/t/domaincoloring-toy-directly-from-the-2-d-fft-of-an-image/138876
**Category:** General Usage
**Tags:** glmakie, complex-numbers
**Created:** [August 17, 2026, 7:06pm UTC](https://discourse.julialang.org/t/domaincoloring-toy-directly-from-the-2-d-fft-of-an-image/138876 "2026-08-17T19:06:10Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![devel-chm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/devel-chm/32/3572_2.png) [@devel-chm](https://discourse.julialang.org/u/devel-chm)
#### Post date: [August 17, 2026, 7:06pm UTC](https://discourse.julialang.org/t/domaincoloring-toy-directly-from-the-2-d-fft-of-an-image/138876/1 "2026-08-17T19:06:10Z")

</div>

I just discovered the [DomainColoring.jl](https://github.com/eprovst/DomainColoring.jl) package and I  
would like to use it to display the 2-D FFT of an input 2-D single channel image.

Is there a way to directly pass the Matrix of Complex64 values to be `domaincolor()`-ed?

Or do I have to create a fake function that takes the input FFT image and maps  
the index pairs to complex numbers—only to be unwrapped to create the complex  
value matrix to be shown?

Thanks,  
Chris

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [August 17, 2026, 9:29pm UTC](https://discourse.julialang.org/t/domaincoloring-toy-directly-from-the-2-d-fft-of-an-image/138876/2 "2026-08-17T21:29:08Z")

</div>

With `M` being your complex matrix, you may try:

```julia
img = DomainColoring.domaincolorshader.(M; abs=true)

# then use Makie to plot the color matrix and add axes:
fig = Figure()
ax = Axis(fig[1,1])
image!(ax, img')

```
