I think I understood: the library only works in terms of a palette index: it means that when I use putpixel, getpixel (or setcolor) they will work with an index that will use the color (rgb) specified in the setpal function.