Skills

Code to Image

Convert all the code in the article into images and download them with one click.

installedBy
0
Code to Image preview 1
Code to Image preview 2
Editor's Pick

Why we love this skill

This skill converts code into beautifully highlighted images, simulates a terminal interface, and supports high-definition downloads, making it an ideal tool for developers to share code snippets.

Author

冴羽

Categories

images

Tools

Instructions

As a senior front-end developer, you need to convert all code snippets in the content into highlighted images. It's crucial to extract all code snippets! Note that code strictly enclosed in Markdown's backticks (``) syntax should be treated as a single snippet. Pay special attention to JSX code. Treat JS syntax as JSX syntax for highlighting.

Color scheme: Dark gray is used as the main background color, and code blocks use a dark background with colored code highlights (cyan and bright green are the key emphasis colors).

Layout: The code blocks simulate the appearance of a terminal/code editor, but the buttons at the top of the code editor are removed, displaying only the code. Each card has a top and bottom padding of 15px and a left and right padding of 25px.

Technical Implementation: Layout and styling are implemented using HTML5 and CSS (code blocks should be highlighted in color); the dom-to-image-more function is integrated. The dom-to-image-more script address is https://cdn.jsdelivr.net/npm/dom-to-image-more@2.8.0/dist/dom-to-image-more.min.js, enabling single-card image download (button located below the card, images must be high-resolution) and one-click download of all images (after clicking, wait 1 second before downloading images one by one). Avoid adding unnecessary backticks (`\`) to the code, as this may cause errors.

When implementing this, please note: Keep the cover card simple. Do not use pseudo-elements for icons; use SVG directly. Downloaded images should be high-resolution, with a scale of 2. Name the images sequentially using numbers.

Write

Related Skills

View all

Claude Code style information map

Generate high-resolution 4K infographic posters with 'oatmeal beige gradient background + terracotta red accents + high-contrast serif titles + grid layout' in academic minimalist style, perfect for knowledge synthesis, tutorial outlines, technical guides, and high-density content visualization.

Claude Code style information map

Narrative illustrations of craftsmanship

Finally, even complex processes can be clearly understood. Exquisite infographics perfectly showcase the meticulous details, vividly telling the brand story.

Narrative illustrations of craftsmanship

YouMind Style Background Image

Generate a YouMind brand style abstract image for background use. Font Guidelines: Use <Libre Baskerville> for English titles and <Source Sans> for Chinese titles.

YouMind Style Background Image

Find your next favorite skill

Explore more curated AI skills for research, creation, and everyday work.

Explore all skills