Tesla custom wraps (Paint Shop) - template, file rules and making the image
teslawrapliverypngimage-maskingcanvasflood-fillpil
Recent Tesla software lets the owner load a custom wrap (a livery image) that the car's 3D model shows in Toybox → Paint Shop. The wrap is a single square PNG laid out like a flat UV unwrap of the body: opaque pixels are paint, transparent pixels are glass and gaps. Making one is an image-masking job: paint a design over the whole canvas, then cut it to the panel template. This page covers the file rules, how to read the template, and the techniques used for a scripted generator and for a browser editor (Wrap Shop at justinahampton.com/tesla/).
File rules and installing
As reported by third-party guides in October 2026 (not checked against Tesla documentation):
- PNG, square, 512 to 1024 px, at most 1 MB.
- File name: letters, numbers, spaces, dashes and underscores, 30 characters or fewer. Up to
10 wraps are kept.
- USB: a drive formatted exFAT or FAT32 (not NTFS), not the TeslaCam drive, with a top-level
folder named Wraps holding the PNG. In the car: Toybox → Paint Shop (Colorizer on older
software) → Wraps.
- Tesla app: Creations → Wrap → Upload, then confirm in the 3D preview. Reported to need app
4.59.0 or later and car software 2026.26, rolled out in waves.
Reading the template
The template used here is a 1024 x 1024 RGBA PNG: opaque white panels with thin dark outlines, everything else transparent. It is mirrored left/right about x = 512. From top to bottom: front bumper, hood, a large transparent center (windshield, glass roof, rear glass), trunk lid, rear bumper. Down each side: fenders, front and rear doors, rocker plus rear quarter; long thin strips are the roof rails / A-pillars and small ovals are the mirror caps. "Left" and "right" in the image have not been verified against the car's driver and passenger sides, and the front-at-top reading comes from the shapes, so test a wrap with an asymmetric mark before relying on it.
Because the panels are disconnected islands, a design meant to flow across panels (stripes, gradients) should be painted over the whole canvas and masked afterward, not drawn panel by panel.
Applying a design (scripted)
With PIL, the whole job is a masked paste:
1. Cover-scale the design to the template size (ImageOps.fit).
2. Paste it onto a transparent canvas using the template's alpha channel as the mask, so glass
stays clear.
3. Optionally draw the outlines back on (template pixels darker than mid-gray, inside the mask);
a real wrap usually looks better without them.
4. Save with optimize=True; if the file is still over 1 MB, palette-quantize to 256 colors.
5. Composite a copy onto gray as a preview and look at it before delivering.
Panel-specific art (a logo on the hood, numbers on the doors) needs the panel's pixel box; measure
it from the template rather than guessing.
Techniques from the browser editor
- Panels by flood fill. Label every connected region of light, opaque template pixels; the
dark outlines separate them. An iterative stack fill over a
Uint8Arraytakes milliseconds at 1024 x 1024. Naming panels is a list of seed points (one known pixel inside each panel). - Grow the panel mask by 2 to 3 px (a few rounds of 4-neighbor dilation) so clipping covers the outline under the panel edge instead of leaving a white seam.
- Tap tolerance. Hit-testing a tap searches a few pixels around it, so a tap that lands on an outline still finds a panel.
- Mirror and twins. Since the template is symmetric, a "mirror" mode draws a flipped copy about x = 512, and a panel's twin is found by mirroring its pixels and taking the majority label on the other side.
- Per-panel adjustment of a finished design. To rotate or scale just the hood when the art came from one image, re-cut the finished composition inside that panel's mask and transform the cut about the panel's bounding-box center. This works no matter how many layers made the design.
- Export: mask by the template alpha, optional outlines with
multiplyblending, and if the PNG exceeds 1 MB step the size down by 128 px, never below 512. Keep everything client-side; photos never need to leave the browser.
Gotchas
- Keep the transparent areas transparent. They are glass and gaps, and the template's alpha channel is the only thing that says where the paint stops.
- Large photos blow the 1 MB limit quickly; quantize or downscale at export rather than asking the user to compress.