Makers Army
Articles

Tools

Keep a family of app graphics editable from drawing to code

A small interface change can leave a surprisingly large trail of artwork. Change an accent colour, adjust a corner or add another button state, and several exported files may need replacing. The difficult part is often remembering which versions belong together.

By Sam 16 November 2026
PaintCode workspace with several controls and their generated code
The drawing canvases and generated code are visible together in the actual app. PixelCut press screenshot.

A small interface change can leave a surprisingly large trail of artwork. Change an accent colour, adjust a corner or add another button state, and several exported files may need replacing. The difficult part is often remembering which versions belong together.

I would start with a small family of related controls and change one shared value. That quickly reveals whether the relationship between drawing and code remains understandable. A generated file is useful when a later revision can be made deliberately and checked in the actual app.

For an independent app creator, a useful first experiment is a small family of related controls: an ordinary state, a selected state and a disabled state. The goal is to find out whether changes remain understandable as the design moves from artwork to the actual app.

Start with a family, not a whole interface

Choose one graphic that already has a clear purpose in your product. A simple playback control, rating symbol or status indicator is easier to evaluate than an elaborate illustration with dozens of effects.

Write down what changes between its states and what stays the same. Colour might change while the outline remains fixed. A label might change while the surrounding geometry should keep its proportions. This short description becomes a useful check when you start connecting values in the document.

Share the values that really belong together

The library contains colours, gradients, shadows, images and variables. A library item can be reused across drawings, and changing it affects the drawings that use it.

A shared colour value is useful when it has a consistent role. Give the value a meaningful name, then reuse it where that role applies. If two colours only happen to look similar today, consider whether they should actually be independent before connecting both to the same item.

The distinction becomes clearer during revision. A shared accent should change throughout the control family. A warning colour probably should not change just because the main accent does. The document is easier to maintain when its shared items describe design decisions rather than a collection of anonymous swatches.

Keep a short record of those decisions alongside the source file. A future collaborator should be able to tell why a value is shared without reconstructing the entire design from its appearance.

Introduce one variable at a time

For the first control, choose one meaningful change. A numeric parameter might adjust a corner radius; a boolean might control whether a selected-state shape is visible. Check that the connection changes the intended part of the drawing and leaves the rest alone.

Then inspect the extremes as well as the ordinary state. A drawing that looks good at a middle value can become confusing when a label is longer, a parameter is zero or an element is hidden. Use values that reflect the real app rather than only the most flattering preview.

Expressions can make relationships more flexible, but they also add another layer to understand. Keep names clear and introduce that complexity only when it explains a real requirement. A small, readable document is a better starting point than one filled with clever relationships nobody else can maintain.

Review the family together

Separate canvases make it possible to inspect related graphics in the same document. Look for differences in visual weight, spacing and alignment before exporting. A selected state should feel like part of the same family, even when its fill or emphasis changes.

It also helps to keep the intended interaction separate from the artwork. Drawing a control does not automatically provide its keyboard behaviour, accessible name, focus treatment or touch target. Those decisions still belong to the app implementation and need to be checked there.

Export a clear boundary with a StyleKit

Make one small revision after the first integration. Change a shared colour or an agreed parameter, export again and confirm that the app picks up the intended result. That second pass reveals whether the workflow is maintainable, not merely whether the first export succeeds.

Use image exports where they make sense

An app may need a mixture of approaches. A static graphic used by another tool might be easier to exchange as an image, while a parameter-driven control could benefit from drawing code. Choose around the destination and the kind of change you expect.

Keep exported files distinguishable from the editable source. Clear names, a predictable output folder and a note about the target prevent an old image from quietly becoming the version everyone continues to use.

A small check you can make now

Use a tiny family of controls as a change test: a normal button, a highlighted button and an icon. Give their shared accent a meaningful name, then change it once and inspect all three. If one object should remain independent, separate that relationship deliberately. A generated drawing routine still needs integration checks for layout, interaction and accessibility. The useful result is a change you can explain from design value to visible output, not simply a large block of generated code.

One tool that can help: PaintCode

PaintCode approaches that problem by turning vector drawings into drawing code. Its canvases, shared library items and StyleKits provide a way to keep related interface graphics in one editable document and carry the result into an application.

Before making PaintCode central to a project, confirm the supported export language and platform against your current development setup. The documentation covers several targets, but the exact integration still depends on the application and framework you use.

The product examples are drawn from the linked developer material, rather than a hands-on test. Try the small exercise above with a copy of your own work before deciding whether this tool suits you.

PaintCode artwork with a shared colour editing popover

Shared library colours give related drawings a common source. PixelCut press screenshot.

PaintCode variable editor beside a gear illustration

Variables connect editable values to the drawing. This is the publisher’s demonstration, not a tested app. PixelCut press screenshot.

PaintCode showing multiple icon canvases and a shape hierarchy

Review the related drawings together before exporting. PixelCut press screenshot.

PaintCode StyleKit catalogue of colours gradients and shadows

The StyleKit gathers the assets intended for the application. PixelCut press screenshot.

Explore PaintCode and check the current requirements. Keep the first evaluation tied to the specific result you need; the general checks in this guide still apply whichever tool you choose.

Sources

  1. 1.Official product documentation and publisher information
  2. 2.Official product documentation and publisher information
  3. 3.Official product documentation and publisher information
  4. 4.Official product documentation and publisher information
  5. 5.Official product documentation and publisher information
  6. 6.Official product documentation and publisher information

Share this article

Know someone who would enjoy this? Pass it along.