Update - (August 29th, 2021): Updated formatting in certain areas to better match an upcoming Overworld tutorial, as it'll likely link to this.
Update - (June 12th, 2020): Uploaded images to a better host (aka My Files, not imgur)
Update - (May 3rd, 2017): Added a paragraph to the Palette Mask section to further clarify the importing/exporting process. Pictures may be added in the future if needed.
Introduction
Welcome! Whether you're a beginner, or an experienced user who simply wants to relearn a couple things, this tutorial aims to teach you in a brief manner how to use one of Lunar Magic's many editors—the Palette Editor. For good reason, too. Levels are made up of more than just the placed sprites and blocks, after all! The palette, if utilized correctly, can play a very important part in giving your level a particular 'feeling', or atmosphere, which can make it even more unique than they would be otherwise. Palettes can change a boring looking cave level into a chilly, ice-coated cavern, or if that's not what you're going for, then they can also change said cave level into a hot, treacherous volcano. These are only a couple of examples, but you get the point.
Just as a fair warning, though: if you clicked this tutorial in the hopes of learning how to make aesthetically pleasing palettes, then you're sadly out of luck. Such a subject generally requires at least a barebones understanding of color theory, and I am by no means experienced in that field. The community's here for a reason, so feel free to ask questions and get feedback from your fellow users.
With that out of the way, let's delve into the Palette Editor!
Welcome to the Lunar Magic Palette Editor!
Once you have your rom opened in Lunar Magic, click on the

This interface may seem a little complex at a first glance, but once you get the hang of it and know how everything works, you'll find it's actually pretty simple. It's not too gimmicky, and aside from the coin's color it's also not very flashy. There are no pointlessly complex, yet specific features that only help certain users, so it's all easy to learn—even for beginners. Allow me to break down what the Palette Editor can accomplish.


Editing most of these is pretty simple (if you look in the bottom right corner of the menu it even tells you the controls!), and to sum it all up:
- Left-click on a color to edit.
- F3 while hovering over any pixel in any open window to copy its color. (Note that this can actually be used on other open programs, though the Palette Editor window must be active within Lunar Magic during this.)
- Control + left-click on a color to copy, and control + right-click (or just simply right-click) on another color to paste over it.
- Control + alt + left-click on a color to copy its entire row, and control + alt + right-click on another color to paste the entire row over it.
- Alt + right-click on two colors to set the end points of a gradient. For example, say you were editing the sky, and wanted to make a nice transition from a light blue to a darker shade of blue. To accomplish this you would first choose the lightest color of the sky, or the beginning of the gradient, like so:
Then, you would choose the darkest blue in the sky, or the last color in the gradient:
After that, you would then alt + right-click on both of the colors (it doesn't matter which order you click on them). It should show you something like this:
Voila! And just like that, the program automatically chose a selection of in-between colors between the two on the outside, giving you a nice transition from light to dark. You're not limited to just five colors either, you can do as many as want, even so far as to stretch across several palettes*. They don't even have to be the same color!**
*Be aware though that making gradients that long generally isn't advised, since you would be potentially overwriting the palettes of various other SMW elements, and very rarely do you need that gradual of a transition, anyway.
**Do use caution when choosing to do this, as some colors simply do not fade together in a way that looks visually appealing.

The listed “Mario Palette” is somewhat of an exception in that instead of having the eight presets that the other elements have, this one just lists the palettes for the Mario, Luigi, and their fire flower variants so you can edit them. More on these below.

Second, saving any changes to the palette is done slightly differently now. Instead of saving within the Palette Editor menu itself like you did previously, changes to the palette are now saved alongside any other changes to the level such as placing/moving objects or sprites. Use the

Unfortunately, a side effect of how Mario and Luigi's palette acts—in that it (Palette 8) changes independently of the rest of the level palette when swapping characters, or when switching to the fire power's colors—enabling this setting actually makes it so custom palettes don't work for colors 6-F, so they'll always change back to the defaults. For example, if you made Mario all black like this:


With custom palette enabled, he would actually show up like this:


If you want to use custom palettes for Mario and Luigi, there is a solution—though it's not recommended for beginning romhackers—consider using this patch.






- 1. Made a gradient
- 2. Changed a red color to be slightly darker
- 3. Replaced a blue with a yellow color
Then pressing




Keep in mind that palette masks do not save with your palette, nor with the level. To keep any changes made, export the current palette. This will export the level's palette as a file called (Insert name here).pal, and a similarly named (Insert name here).palmask will be created right next to it. Of these two, only the .pal file needs to be imported into whatever level you intend on using it for—as long as the .palmask is still named identically to the .pal and is in the same folder, it will be automatically applied.
A useful feature for if you want to transfer only parts of a level's custom palette to another level, and it's even necessary to use if you ever create and distribute your own custom graphics.













Some Special Thanks
Just wanted to give a quick thanks to:
- FuSoYa for Lunar Magic itself, and all the work he's put into it over the years.
- SMWCentral for being a part of my life for almost eight years at this point.
- LIVE THE CODE THE CODE OF THE DRAGON
Finishing Statement
Right off the bat, I just want to say that I hope this helps any beginning romhackers at least a little bit. Being my first tutorial, my formatting could definitely use some work, though considering a lot of the features I tried to cover had really simple, almost self-explanatory uses—there wasn't too much I could say for some of them without dragging it on too much. And if have some constructive criticism I could use to try and improve this tutorial further, please let me know! If you have any questions, feel free to leave them as a reply and hopefully somebody can answer.
~ Veck.