Use Carbon and Placode to create code screenshots from your editor

Time:2019-10-6

Carbon

Carbon is a free open source library for creating and sharing beautiful images of source code. You can easily use Carbon by visiting https://carbon.now.sh. Whether it’s simply starting to write code in boxes or placing files in text areas provided on the site.

Use Carbon and Placode to create code screenshots from your editor

You can change the color theme from the first drop-down menu. You can also choose your language from the second drop-down menu. You can also change the background color by clicking the button with the text BG. There are many other options available that you can change by clicking on the Settings Gear icon. Click the screen capture of the saved image to download the image. The following is how the screenshot looks:

Use Carbon and Placode to create code screenshots from your editor

Carbon’s source code can be obtained under GitHub’s MIT license for dawnlabs/carbon. It has the following functions:

  • Import from GitHub gist
  • Custom picture grammar, window style, background color, color theme, etc.
  • Click to save or send a tweet

Carbon also provides plug-ins for various editors and IDEs created by the community. You can find all of them here. Just select the code or open the file, and then follow the appropriate steps provided in the document.

If you are using PhpStorm or any other JetBrains IDE, simply select the code and select it from the context menu you open.Open in carbon.now.shThe method is to right-click the selected text.

Polacode

Polacode isVisual Studio CodeExtension allows you to quickly create wonderful code screenshots. It keeps all styles and themes in one place.

You may wonder why not just screenshots.

  • It generates decent images on Windows and Linux
  • It hides errors, warnings, line numbers and other markers that you might not like.
  • It gives you a good visual effect.

You can search Polacode by opening the extension window.visual studio codeEasy installation of Polacode. Then click Install and you have this extension.

Now open the file you want. Select the code you want in the screen shot and copy it. Now turn toView> Command PaletteAnd then enter it in the box> polacodeAnd select the Polacode option. It will create a separate horizontal window. Click on the window and press on WindowsCtrl + VOr on MacCmd + VPaste code. Under the code, you paste another window and you see a camera like an icon. Click on this icon and save the picture.

Use Carbon and Placode to create code screenshots from your editor

The resulting image looks like this:

Use Carbon and Placode to create code screenshots from your editor

So, now continue to create beautiful code screenshots, and then you can go to microblog, wechat and other places you want to send.

For more PHP knowledge, please go to PHPCasts