Super Mario 64 (SM64) Color Code Generator is a utility used to create GameShark-style cheat codes that modify Mario’s color palette in real-time. These "Color Codes" (often abbreviated as
) are essential for machinima creators, as they allow for easy creation of custom characters, alternate costumes, and YouTuber avatars like those seen in SMG4 videos. 1. Choose Your Generator
Several tools exist depending on whether you want a modern web interface or a classic downloadable program: SM64 Colour Code Generator (the404devs)
: A popular web-based tool that supports various ROM versions (NTSC, PAL, iQue) and features real-time visual previews with shadow and highlight support. Saturn Color Editor
: A modern web editor optimized for Saturn and sm64js, allowing for real-time in-game modifications. SM64 Mario Colour Code Generator V1.1 (James Stuart)
: A classic downloadable Windows utility (requires .NET Framework) that pioneered easy code generation. 2. Customizing Your Character
Regardless of the tool, the customization process generally follows these steps: Select Body Parts
: Choose specific parts of Mario to recolor, such as his cap, overalls, shirt/arms, gloves, shoes, or skin. Pick Colors
: Use a color picker to select a main color. Modern generators like the the404devs version also allow you to set specific shadow and highlight tones for a smoother, 3D appearance. Set Region
select the correct region for your ROM (typically NTSC-U for US versions or PAL for European versions), as the memory addresses for colors differ between them. 3. Applying the Code in an Emulator Sm64 Color Code Generator
Once you have generated and copied your code, follow these steps in an emulator like Open Cheat Menu : While the game is running, go to System > Cheats (or press Ctrl+C). Add New Cheat : Right-click in the cheat window and select Add New Cheat Paste Code
: Give the cheat a name (e.g., "Blue Mario") and paste the long string of hex codes into the code box.
: Check the box for your new cheat. The colors should update immediately or after the next room transition/file load. Common Issues & Tips Code Length
: Most standard color codes are between 300–350 digits long. If your code is too short, it might only be editing one specific section of Mario. The "-20 Trick"
: Standard codes created for the original SM64 may not work on certain ROM hacks (like
). Experienced hackers use the "-20 trick" or ADMA tools to adjust addresses for compatibility. Real-Time Tools
: For creators who want to edit colors while playing without copying codes, tools like offer visual editors that modify memory in real-time. pre-made color codes for popular characters like Luigi, Wario, or Waluigi? the404devs/sm64code: colour code generator for ... - GitHub
A tool that creates action replay codes to change mario's colours in sm64. https://sm64code.the404.nl. SM64 Mario Colour Code Generator V1.1
For the curious modder, here’s the "why" behind the tool. The N64 stores color in a 16-bit word (2 bytes), but only uses 15 bits: Super Mario 64 (SM64) Color Code Generator is
Bit layout: 0RRRRRGGGGGBBBBB
When you give the tool an RGB value of (255, 100, 50), it does this math:
round(channel / 8)).255 / 8 = 31.875 → 31 (max red)100 / 8 = 12.5 → 1350 / 8 = 6.25 → 6(31 << 10) | (13 << 5) | 6 = final hex code.The generator handles all this bit-shifting for you. It’s a small piece of code that saves hours of headache.
When you edit Mario’s textures in a program like Paint.NET, you see colors as Red (255), Green (0), Blue (0) for pure red. However, the Nintendo 64 hardware processes colors differently. It uses RGB555, where each color channel uses 5 bits (values 0–31) instead of 8 bits (0–255).
If you try to directly copy an RGB value from a web palette into an SM64 ROM editor, you will end up with banding, posterization, or the wrong color entirely. The generator bridges this gap.
To understand why this generator is essential, you need a 30-second lesson in N64 color science.
Most modern computers use RGB888 (8 bits per channel: Red, Green, Blue). This gives 256 values per channel, totaling 16.7 million colors.
The Nintendo 64, to save precious memory bandwidth, often uses RGB565 (5 bits for Red, 6 bits for Green, 5 bits for Blue). This gives:
When you enter a modern RGB value like (255, 0, 0) for true red, the SM64 engine cannot display it. It has to quantize it to the nearest available RGB565 value. The SM64 Color Code Generator automates this quantization. It takes your desired rgb(255,0,0) and tells you the exact hex code—typically something like 0xF800—that the SM64 binary actually reads.
If you are playing on a real N64 or Project64, you can use RAM cheats to change colors without modifying the ROM. A generator helps you create the cheat. The Technical Magic: How 15-Bit Color Works For
81?????? ???? – You replace the ???? with your generated 4-digit hex code.The true depth of the generator is found when users look past the simple "Fill" tool. A novice might just turn Mario bright green. A veteran of the generator understands the nuance of the game's lighting.
Because the N64 uses vertex shading, simply changing a color can ruin the illusion of depth. If you make Mario’s overalls a single flat blue, he looks like a low-poly cardboard cutout.
Advanced generators allow users to manipulate the Shading Color.
Mastering the generator meant learning to be a digital painter within the strict constraints of 1996 hardware. It taught a generation of modders the basics of hex editing and memory addresses without them even realizing they were learning computer science.
The tool is powerful, but not perfect.
Old-school generators output a single 2-byte hex value. You copy this directly into a ROM offset. These are rigid and prone to crashing if you overwrite the wrong byte.
The SM64 Color Code Generator is not just for Mario. You can use the exact same codes to recolor:
The logic is universal: Any surface in SM64 that uses a "solid color" (not a texture) relies on the 5-bit RGB555 system.