Hi,

I don't really know what you want to achieve blush. Anyway, bellow is your code with a test program

In the manual, it is said that "Structs can not be used for parameters, but struct pointers can."

Code:
#include <acknex.h>
#include <default.c>

BMAP *bmp_nature = "NATURE.JPG";

PANEL *pan_bmp = 
{
	bmap = bmp_nature ;	
	flags = SHOW ;
	
	scale_x = 0.5 ;
	scale_y = 0.5 ;
}

PANEL *my_panel = 
{	
	scale_x = 0.5 ;
	scale_y = 0.5 ;
	
	pos_x = 400;
}

BMAP *my_bmap;

// Color bmap
function color_bmap(COLOR *pixel_color)
{
	var count_x;
	var count_y;
	var pixel;
	
	COLOR temp_color;
	var bmp_width = bmap_width(my_bmap);
	var bmp_height = bmap_height(my_bmap);
	
	BMAP* temp_bmap = bmap_createblack(bmp_width, bmp_height, 32);
	
	bmap_lock(temp_bmap,0);
	bmap_lock(my_bmap,0);
	
	count_y = 0;
	while(count_y<bmp_height)
	{ 
		count_x = 0;
		while(count_x<bmp_width)
		{
			pixel = pixel_for_bmap(my_bmap,count_x,count_y);
			pixel_to_vec(&temp_color,NULL,8888,pixel);
			if(temp_color.blue==pixel_color->blue||temp_color.red==pixel_color->red||temp_color.green==pixel_color->green)
			{
				temp_color.red = 0;
				temp_color.green = 0;
				temp_color.blue = 250;
				pixel = pixel_for_vec(&temp_color,100,8888);
				pixel_to_bmap(temp_bmap,count_x,count_y,pixel);
			}
			count_x += 1;
		}
		count_y += 1;
	}
	bmap_unlock(temp_bmap);
	bmap_unlock(my_bmap);
	my_panel.bmap = temp_bmap;
	set(my_panel,VISIBLE);
}

void main()
{
	wait(1);
	my_bmap = pan_bmp->bmap;
	
	color_bmap(vector(0, 150, 0));
}




This is a sample code to transform a bmap to a gray scale
Code:
#include <acknex.h>
#include <default.c>

BMAP *bmp_nature = "NATURE.JPG";
BMAP *FIREFOX_3_bmap = "FIREFOX_3.JPG";
BMAP *bmp_box = "box.png" ;

PANEL *pan_bmp = 
{
	bmap = bmp_nature ;	
	flags = SHOW ;
	
	//scale_x = 0.2 ;
	//scale_y = 0.2 ;
}

void main()
{
	// Wait for video functions to be ready
	wait (1) ;
	
	BMAP *bmp_to = pan_bmp->bmap ;
	
	pan_bmp->pos_x = ( screen_size.x - bmap_width ( bmp_to ) ) * 0.5 ;	
	pan_bmp->pos_y = ( screen_size.y - bmap_height ( bmp_to ) ) * 0.5 ;
	
	var format = bmap_lock ( bmp_to, 0 ) ;
	if ( format > 565 )
	{
		int width = bmap_width ( bmp_to ) ;
		int height = bmap_height ( bmp_to ) ;
		
		int i = 0 ;
		int j = 0 ;
		
		COLOR vec_color ;
		var pixel ;
		var pixel_transparency;
		
		for ( i = 0; i<width ; i++ )
		{
			for ( j = 0; j < height ; j++ ) 
			{
				pixel = pixel_for_bmap ( bmp_to, i, j ) ;
				pixel_to_vec ( &vec_color, &pixel_transparency, format, pixel ) ;
				
				vec_mul( &vec_color, vector ( 0.0721, 0.7154, 0.2125 ) ) ; 
				//vec_mul( &vec_color, vector ( 0.5, 0.587, 0.299 ) ) ; 
				//vec_mul( &vec_color, vector ( 0.3, 0.59, 0.11 ) ) ; 
				
				int gray = vec_color.red + vec_color.blue + vec_color.green ;
				
				int red = (vec_color.red * .393) + (vec_color.green *.769) + (vec_color.blue * .189) ;

				int green = (vec_color.red * .349) + (vec_color.green *.686) + (vec_color.blue * .168) ;
				
				int blue = (vec_color.red * .272) + (vec_color.green *.534) + (vec_color.blue * .131) ;
				
				pixel = pixel_for_vec ( vector( gray, gray, gray ), pixel_transparency, format ) ;
				pixel_to_bmap ( bmp_to, i, j, pixel ) ;
				
			}
		}
	}
	
	bmap_unlock ( bmp_to ) ;
}