# How to see the color layers of an image in Julia

**URL:** https://discourse.julialang.org/t/how-to-see-the-color-layers-of-an-image-in-julia/21513
**Category:** General Usage
**Created:** [March 5, 2019, 10:08pm UTC](https://discourse.julialang.org/t/how-to-see-the-color-layers-of-an-image-in-julia/21513 "2019-03-05T22:08:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![GERSON\_EZEQUIEL\_HERN](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gerson_ezequiel_hern/32/7437_2.png) [@GERSON\_EZEQUIEL\_HERN](https://discourse.julialang.org/u/GERSON_EZEQUIEL_HERN)
#### Post date: [March 5, 2019, 10:08pm UTC](https://discourse.julialang.org/t/how-to-see-the-color-layers-of-an-image-in-julia/21513/1 "2019-03-05T22:08:45Z")

</div>

I want to see the layers of color that my image has, in this case it is toy occupying the image of the mandril, and I want to see all the layers of color that that image has.

Can somebody help me?

---

<div class="post-metadata">

### Author: ![longemen3000](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/longemen3000/32/7298_2.png) [@longemen3000](https://discourse.julialang.org/u/longemen3000)
#### Post date: [March 5, 2019, 10:33pm UTC](https://discourse.julialang.org/t/how-to-see-the-color-layers-of-an-image-in-julia/21513/2 "2019-03-05T22:33:16Z")

</div>

i played with the [docs of Images.jl](https://juliaimages.org/latest/function_reference.html#ImageCore.StackedView) and this seems pretty good:

```julia
using Images, TestImages
img = testimage("mandrill")
 #the point is to broadcast the operation to the entire array
redmandrill=red.(img) #red channel
bluemandrill=blue.(img) #blue channel
greenmandril=green.(img) #green channel

```

the numbers are a fraction of 255 (normalized between 0 and 1)

---

<div class="post-metadata">

### Author: ![GERSON\_EZEQUIEL\_HERN](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gerson_ezequiel_hern/32/7437_2.png) [@GERSON\_EZEQUIEL\_HERN](https://discourse.julialang.org/u/GERSON_EZEQUIEL_HERN)
#### Post date: [March 5, 2019, 10:52pm UTC](https://discourse.julialang.org/t/how-to-see-the-color-layers-of-an-image-in-julia/21513/3 "2019-03-05T22:52:36Z")

</div>

thank you very much friend, I would like to see him as his behavior of the images

---

<div class="post-metadata">

### Author: ![p13rr0m](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/p13rr0m/32/22796_2.png) [@p13rr0m](https://discourse.julialang.org/u/p13rr0m)
#### Post date: [November 10, 2022, 6:43am UTC](https://discourse.julialang.org/t/how-to-see-the-color-layers-of-an-image-in-julia/21513/4 "2022-11-10T06:43:38Z")

</div>

Another options is to use the broadcasted version of `getproperty`

```julia
redmandrill=getproperty.(img, :r) #red channel
bluemandrill=getproperty.(img, :g) #blue channel
greenmandril=getproperty.(img, :b) #green channel

```
