get_color_profile_slot_g

Returns the green component of a character’s color slot, with a value from 0 to 255. Note that this does not take into account changes made by set_character_color_slot or set_article_color_slot.

ArgumentTypeDescription
color:realThe color profile to check
shade:realThe specific color of the profile to check

Example, called from post_draw.gml:

//This code draws a custom sprite tinted to the exact color of the player's first color slot.
var col_R = get_color_profile_slot_r( get_player_color(player), 0);
var col_G = get_color_profile_slot_g( get_player_color(player), 0);
var col_B = get_color_profile_slot_b( get_player_color(player), 0);

var col_final = make_color_rgb(col_r, col_g, col_b);

draw_sprite_ext(sprite_get("custom_sprite"), image_index, x, y, image_xscale, image_yscale, image_angle, col_final, image_alpha);