You must have often seen people sharing code in beautiful images.
- How can you do the same without much effort?
- Does there exist any service where you could just copy and paste your code and create such images?
YES 💡 🔥 ⚡ https://carbon.now.sh
aka Carbon.
You can go to Carbon and just paste your code in the editor and download a beautiful image (svg
or png
). The following example was created on Carbon.
A demo python class - by Author |
You can also use a carbon-config.json
file to import/export the configuration you used on Carbon while creating the code images.
// https://carbon.now.sh/
// carbon-config.json
{
"paddingVertical": "56px",
"paddingHorizontal": "56px",
"backgroundImage": null,
"backgroundImageSelection": null,
"backgroundMode": "color",
"backgroundColor": "rgba(74,144,226,1)",
"dropShadow": true,
"dropShadowOffsetY": "20px",
"dropShadowBlurRadius": "68px",
"theme": "material",
"windowTheme": "none",
"language": "auto",
"fontFamily": "Fira Code",
"fontSize": "14px",
"lineHeight": "152%",
"windowControls": true,
"widthAdjustment": true,
"lineNumbers": true,
"firstLineNumber": 1,
"exportSize": "2x",
"watermark": false,
"squaredImage": false,
"hiddenCharacters": false,
"name": "",
"width": 680
}
-
Extension
Gif Code Snippet
Installed- Extension Identifier:
subhendukundu.gif-code-snippet
- Extension URL: https://marketplace.visualstudio.com/items?itemName=subhendukundu.gif-code-snippet
- Extension Identifier:
-
PolaCode
- Polaroid for your code 📸
- GitHUb: https://github.com/octref/polacode