First attempt at palette API
currently foiled by the fact the api doesn't allow accessing and casting the koresource.