How a code picture is made

A code picture is a still of a snippet, coloured so the shape of the code is easy to see. It is meant for a slide, a post, or a note.

A short JavaScript snippet in a dark window on a warm gradient
A short JavaScript snippet in a dark window on a warm gradient

A picture, not a program

The app does not compile or run what you paste. It colours the text the way a code editor does: comments, strings, numbers, and the words a language treats as keywords. That is enough for a reader to see the structure. It is not a check that the code is correct.

What gets a colour

Comments and strings are drawn in their own colours, so a note in the code and a piece of text stay distinct. Numbers, and names that are followed by parentheses, do too. A word that starts with a capital, such as String or Person, is marked when the language uses that pattern. Plain text is left uncoloured, which suits a note that is not code.

The frame around it

A window frame adds the three dots and a title, so the picture looks like an editor on a slide. Plain leaves only the code card. The backdrop is the colour behind the card: none, or a gradient. Line numbers help when you talk through a snippet. Padding and the type size change how much air the picture has.

Keeping the snippet

The last snippet and the look you chose stay in this browser. Save downloads a PNG. Save as JSON keeps the snippet and the settings in a file you can open later. Nothing is uploaded.

Ofta ställda frågor

Does this run my code?

No. It only draws the snippet. The colours follow the usual groups an editor uses. They do not mean the code was checked.

Is my code uploaded?

No. The picture is drawn in your browser, and the last snippet stays there. A JSON file is saved only when you ask for one.

Which languages are coloured?

JavaScript, TypeScript, Python, C#, Java, C++, Go, Rust, HTML, CSS, JSON, SQL and Bash. Anything else can be shown as plain text. A language that is listed still uses a visual theme, not a full parser.

Redo att prova det?

Öppna PictorX i din webbläsare - ingen installation, inget kreditkort krävs för att starta.

Open Code to Image