get_palette_entry
uint8* color = get_palette_entry(foreground_color(attr));
uint8* backgroundColor = get_palette_entry(background_color(attr));
uint8* color = get_palette_entry(background_color(attr));