# Custom blendMode math?

**URL:** <https://discourse.processing.org/t/custom-blendmode-math/26562>\
**Category:** Development\
**Created:** [December 28, 2020, 5:12pm UTC](https://discourse.processing.org/t/custom-blendmode-math/26562 "2020-12-28T17:12:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tinywitchdraws](https://avatars.discourse-cdn.com/v4/letter/t/ee59a6/32.png) [@tinywitchdraws](https://discourse.processing.org/u/tinywitchdraws)\
**Post date:** [December 28, 2020, 5:12pm UTC](https://discourse.processing.org/t/custom-blendmode-math/26562/1 "2020-12-28T17:12:45Z")

</div>

I’m working on a little image processing app, and I want to try building a custom blend mode.  
Specifically, I want to use Divide (Newcolor= A/B)in my sketch, and p5js doesn’t have it-- is there a way for me to make it? Maybe implement it somewhere? I’d love any ideas on how to solve this or solutions to similar issues that have worked for you.

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [December 28, 2020, 7:23pm UTC](https://discourse.processing.org/t/custom-blendmode-math/26562/2 "2020-12-28T19:23:45Z")

</div>

Hi @tinywitchdraws  
Do you mean like [filter types](https://www.geeksforgeeks.org/p5-js-filter-function/) in the filter function?  
We can use the [pixels array](https://p5js.org/reference/#/p5.Image/pixels) and perform all kinds of operations on individual pixels. See here a [blur example.](https://processing.org/examples/blur.html)
