# coloured maskblob

**URL:** <https://psychtoolbox.discourse.group/t/coloured-maskblob/252>\
**Category:** Uncategorized\
**Created:** [June 20, 2014, 8:37am UTC](https://psychtoolbox.discourse.group/t/coloured-maskblob/252 "2014-06-20T08:37:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [June 20, 2014, 8:37am UTC](https://psychtoolbox.discourse.group/t/coloured-maskblob/252/1 "2014-06-20T08:37:06Z")

</div>

I would like to have your advice for a basic question; how to generate 'maskblob' on colour background.  
  

On PsychDemo, for example,  
- AlphaImageDemo.m  

- GazeContingentDemo.m  

use alpha channel to create the maskblob but with gray background colour (gray = GrayIndex(screenNumber);)  

Is there any way to chnage the colour of the maskblob along with any background colour?  
  
What I would like to do is to generate a gaussian mask (or a window) to see stimulus without any edge effect,  

say, images of any objects or faces on coloured background with blurred image frame.  

What would be the best method?  

  

I thought of using blending two colour images by  
 Screen('BlendFunction', w, GL\_SRC\_ALPHA, GL\_ONE\_MINUS\_SRC\_ALPHA);  
 Screen('DrawTexture', w, img1);  
 Screen('DrawTexture', w, img2,[],[],[],[],[0-1]);  

But I am uncertain.  

  

I would be grateful any of your advice.  

Many thanks.  

Ka
