An API for adding custom palettes for custom robes (or other unique robe effects (like neve's)).
Visit this page for a tutorial and examples on how to do use this with your custom robes.
(as well as how to make a custom robe mod)
You'll want to pass in a 2x56 texture that looks something like this


By using CustomPalettes.Palettes.AddPalette and its overloads:
CustomPalettes.Palettes.AddPalette(string fullPath)
CustomPalettes.Palettes.AddPalette(params string[] pathDirectories)
CustomPalettes.Palettes.AddPalette(Texture2D palleteTexture)
Examples:
string fullPathToSpriteFile;
int myPalette = CustomPalettes.Palettes.AddPalette(fullPathToSpriteFile)
//use myPalette in custom robe
string assemblyLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location;
int myPalette = CustomPalettes.Palettes.AddPalette(assemblyLocation, "Assets", "MySprite.png")
//use myPalette in custom robe
Texture2D textureLoadedFromAssetBundleOrSomething;
int myPalette = CustomPalettes.Palettes.AddPalette(textureLoadedFromAssetBundleOrSomething)
//use myPalette in custom robe
Any questions or feedback or mind exploding issues, ping/message thetimesweeper on Discord
Some mods that use custom palettes:
only_going_up_fr0m_here - original palette code and image loading codetheholygrind - modified player sprite sheetthetimesweeper - migrating and improving palette codekvadratisk - help improving palette codeBepInEx/plugins folder create a new folder called TheTimesweeper-CustomPalettesplugins folder into this new folder.0.1.0