The image used doesn't seem to matter. Here's an RGB image:

import numpy as np
import PIL
from PIL import Image
img = Image.open('sigh.png')
img_P17 = img.convert('P', palette = Image.Palette.ADAPTIVE, colors = 17) # 17 color palettized image
img_P17.show()
# Fewer than 17 color palette conversion not working for some reason:
img_P16 = img.convert('P', palette = Image.Palette.ADAPTIVE, colors = 16) # 16 color palettized image
img_P16.show() #ValueError: conversion not supported
