/// @param palette_index

var _index = argument[0];
/*
npal_black = [choose(0, 0.1), choose(0, 0.1), choose(0, 0.1)];
npal_dkgray = [choose(0.25, 0.4), choose(0.25, 0.4), choose(0.25, 0.4)];
npal_gray = [choose(0.5, 0.7), choose(0.5, 0.7), choose(0.5, 0.7)];
npal_white = [choose(0.8, 1), choose(0.8, 1), choose(0.8, 1)];
*/
var _sur = surface_create(4, 1);
surface_set_target(_sur);
draw_sprite(spr_palette, _index, 0, 0);
surface_reset_target();
var _p_black  = surface_getpixel(_sur, 0, 0);
var _p_dkgray = surface_getpixel(_sur, 1, 0);
var _p_gray   = surface_getpixel(_sur, 2, 0);
var _p_white  = surface_getpixel(_sur, 3, 0);

surface_free(_sur);

npal_black = sc_color_to_percent(npal_black, _p_black);
npal_dkgray = sc_color_to_percent(npal_dkgray, _p_dkgray);
npal_gray = sc_color_to_percent(npal_gray, _p_gray);
npal_white = sc_color_to_percent(npal_white, _p_white);