X has the method XCreatePixmapCursor to create a cursor from a pixmap with a color depth of 1. The foreground and background colors can be other than black and white, but there are only two colors.
Is there a way to create a multicolored cursor in X?
You probably need to use the X Cursor Extensions. See the XCURSOR(3) manpage and the X11/Xcursor/Xcursor.h header file.