chaozh / carbon

๐ŸŽจ Create and share beautiful images of your source code

Home Page:https://dawnlabs.io/carbon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

maintained with Ranger All Contributors MIT License FOSSA Status



Translations
Espaรฑol เคนเคฟเค‚เคฆเฅ€ Deutsch ็ฎ€ไฝ“ไธญๆ–‡ Portuguรชs
เดฎเดฒเดฏเดพเดณเด‚ Tรผrkรงe ํ•œ๊ตญ์–ด เฎคเฎฎเฎฟเฎดเฏ Franรงais
ๆ—ฅๆœฌ่ชž Svenska Polski Nederlands ๆญฃ้ซ”ไธญๆ–‡
Indonesia ะฃะบั€ะฐั—ะฝััŒะบะฐ Italiano ืขื‘ืจื™ืช ะ ัƒััะบะธะน
ุงู„ุนุฑุจูŠุฉ Add +

Introduction

You know all of those code screenshots you see on Twitter? Though the code's usually impressive, we saw room for improvement in the aesthetic department. Carbon makes it easy to create and share beautiful images of your source code. So what are you waiting for? Go impress all of your followers with your newfound design prowess.

Carbon example

Features

  • Customization. Customize things like your image's syntax theme, font style, and more
  • Share quickly. Save your image or a link with one click
  • Save snippets. Create an account to save snippets for later. Shared snippets are automatically unfurled on Twitter and Slack.

Usage

Import

There are a few different ways to import code into Carbon:

Customization

Once you've got all of your code into Carbon, you can customize your image by changing the syntax theme, background color, window theme, padding, shadows, fonts, and more.

Exporting & Sharing

After you've customized your image you can share your snippet in a number of ways

Create a saved snippet

Sharing a saved snippet will automatically unfurl the image on platforms like Twitter and Slack. This lets users see your creation, while also giving them access to the source code via the link. Better yet, if you need to make an update, simply follow the link yourself to edit the snippet directly.

To create a saved snippet:

  1. Login using the "Sign in/Sign up" button
  2. Edit as you normally would โ€” your snippet will get saved automatically
  3. Copy the URL from your browser window and share away!
Embed a snippet

This is the recommended method for sharing Carbon on your own website or blog. Readers can even copy the code with the click of a button.

You can embed any Carbon snippet in your website directly using the carbon.now.sh/embed URL. The "Copy Menu" lets you quickly copy the correct iFrame snippet, or the encoded URL for embedding on platforms like Medium.

Finally, you can also embed saved snippets or GitHub gists using carbon.now.sh/embed/:id.

Use the Tweet button

The Tweet button will not only share the image on Twitter, but it will also correctly encode the alt text to ensure your images are accessible. However, if you want to tweet image yourself, please check out how to make your Twitter images accessible.

Download the image directly

Carbon supports downloading your image as a PNG and SVG. You can also click Export โ†’ Open to open your image directly in the browser. Finally, you can copy the Carbon image directly to your clipboard by going to Copy โ†’ Image.

Installing Carbon for Desktop (Offline)

If you are using Google Chrome, or another browser that supports Progressive Web Apps, you can install Carbon for use offline by:

  1. Visit carbon.now.sh
  2. Click your browser's settings menu
  3. Click "Install Carbon..."

Community

Check out these projects our awesome community has created:

Editor Plugins
Tools
  • CLI carbon-now-cli - Open a file in Carbon or download it directly using carbon-now, featuring an interactive mode, selective highlighting and more
  • CodeExpander - A smart GitHub gist client with the TextExpander features
  • nef - Export multiple Carbon code snippets from Xcode Playground.
  • @carbonshbot - A Telegram chatbot wich takes in a code snippet or gist URL and generates an Carbon image
  • R carbonate - Iteratively manipulate image aesthetics in R and either open in Carbon or download directly.
  • Carbon for Slack - Use Carbon directly in Slack. Just invoke the /carbon command.
Citations

Authors

Carbon is a project by:

License

FOSSA Status




Contribute & Support

Pull requests are welcome! Please see our contributing guidelines for more details.

Sponsors & Backers

Fossa

Powered by Vercel

Thanks To

โ–ฒ Vercel for sponsoring Carbon's hosting.

All Contributors

Thanks goes out to all these wonderful people (emoji key):

briandennis
briandennis

๐Ÿ’ป ๐Ÿ“– ๐Ÿš‡ ๐Ÿ‘€
mfix22
mfix22

๐Ÿ’ฌ ๐Ÿ’ป ๐Ÿค”
jakedex
jakedex

๐Ÿ’ฌ ๐Ÿ’ป ๐ŸŽจ ๐Ÿ“น
andrewda
andrewda

๐Ÿ’ฌ ๐Ÿ’ป ๐Ÿ› ๐Ÿ‘€
yeskunall
yeskunall

๐Ÿ’ป ๐Ÿ“– ๐Ÿ”ง ๐Ÿ›
stoshfabricius
stoshfabricius

๐Ÿ’ป
jkling38
jkling38

๐Ÿ“–
otobrglez
otobrglez

๐Ÿ’ป
darahak
darahak

๐Ÿ“–
dom96
dom96

๐Ÿ’ป
elrumordelaluz
elrumordelaluz

๐Ÿ’ป
cjb
cjb

๐Ÿ’ป
Krzysztof-Cieslak
Krzysztof-Cieslak

๐Ÿ’ป
fernahh
fernahh

๐Ÿ“–
g3r4n
g3r4n

๐Ÿ’ป
Mat Gadd
Mat Gadd

๐Ÿ› ๐Ÿ’ป
Brad Davies
Brad Davies

๐Ÿ› ๐Ÿ’ป
Rafael Cรขmara
Rafael Cรขmara

๐Ÿ’ป
Gleb Bahmutov
Gleb Bahmutov

โš ๏ธ ๐Ÿ”ง
Ivรกn Munguรญa
Ivรกn Munguรญa

๐Ÿ’ป
Dillon Mulroy
Dillon Mulroy

๐Ÿ’ป
Nihad Abbasov
Nihad Abbasov

๐Ÿ’ป
Bruno C. Couto
Bruno C. Couto

๐Ÿ’ป
Mark Molnar
Mark Molnar

๐Ÿ’ป
Takahiko Inayama
Takahiko Inayama

๐Ÿ’ป
Franรงois Martin
Franรงois Martin

๐Ÿ’ป
Raphael Amorim
Raphael Amorim

๐Ÿ’ป
Camron Flanders
Camron Flanders

๐Ÿ’ป
Eric Adamski
Eric Adamski

๐Ÿ’ป
Winner Crespo
Winner Crespo

๐Ÿ’ป ๐ŸŽจ
Milos
Milos

๐Ÿ’ป ๐Ÿ”ง ๐Ÿ“– ๐ŸŒ
Yashu Mittal
Yashu Mittal

๐Ÿ’ป
Rachel M. Carmena
Rachel M. Carmena

๐Ÿ“–
Miguel Salazar
Miguel Salazar

๐Ÿ“– ๐ŸŒ
Vyom Jain
Vyom Jain

๐Ÿ“– ๐ŸŒ
racaljk
racaljk

๐ŸŒ
Sean
Sean

๐Ÿ’ป
Izabela Borges
Izabela Borges

๐ŸŒ
Shinil M S
Shinil M S

๐ŸŒ
Berke Atac
Berke Atac

๐ŸŒ
LEE YONGJUN
LEE YONGJUN

๐ŸŒ
Matthew Nielsen
Matthew Nielsen

๐Ÿ’ป
Boy
Boy

๐Ÿ“ฆ
Vetrivel Chinnasamy
Vetrivel Chinnasamy

๐ŸŒ
Farzad YZ
Farzad YZ

๐Ÿ’ป ๐Ÿค”
Yannick Loriot
Yannick Loriot

๐ŸŒ
Joel Hanson
Joel Hanson

๐Ÿ’ป
Muhammad Muzzammil
Muhammad Muzzammil

๐Ÿ’ป
souppower
souppower

๐Ÿš‡
Masato Urai (@uraway_)
Masato Urai (@uraway_)

๐ŸŒ
Fernando
Fernando

๐ŸŒ
Megha Sachdev
Megha Sachdev

๐Ÿ’ป โš ๏ธ
Anudeep Reddy
Anudeep Reddy

๐Ÿš‡
Munieru
Munieru

๐ŸŒ
Adam Lusted
Adam Lusted

๐Ÿ’ป
Jose Noriega
Jose Noriega

๐ŸŒ
Merlin Fuchs
Merlin Fuchs

๐ŸŒ
Ramy Majouji
Ramy Majouji

๐Ÿ’ป
Viktor Nemes
Viktor Nemes

๐Ÿ’ป
Eric Bailey
Eric Bailey

๐Ÿ’ป
Nazeefa
Nazeefa

๐ŸŒ
Pratik Butani
Pratik Butani

๐Ÿ“
Bakti Aditya
Bakti Aditya

๐Ÿ’ป
Caleb Taylor
Caleb Taylor

๐Ÿ’ป
Rogรฉrio Munhoz
Rogรฉrio Munhoz

๐Ÿ’ป
Technoknol
Technoknol

๐Ÿ’ป
Tymoteusz Makowski
Tymoteusz Makowski

๐Ÿ’ป
Nisar Hassan Naqvi
Nisar Hassan Naqvi

๐Ÿ›
Ilyas Karim
Ilyas Karim

๐Ÿ›
Nick Fix
Nick Fix

๐Ÿค”
Melanie Sumner
Melanie Sumner

๐Ÿค”
aluc
aluc

๐Ÿ’ป
B. Mearns
B. Mearns

๐Ÿค”
Peng Jie
Peng Jie

๐Ÿ’ป
Binyamin Aron Green
Binyamin Aron Green

๐Ÿ’ป
Michal
Michal

๐ŸŒ
Quinn Blenkinsop
Quinn Blenkinsop

๐Ÿ’ป
Dwiferdio Seagal Putra
Dwiferdio Seagal Putra

๐Ÿ’ป
Ashley Woodall Clark
Ashley Woodall Clark

๐Ÿ’ป
Tim Wienk
Tim Wienk

๐ŸŒ
George McCarron
George McCarron

๐Ÿ“–
Erwin Rahayu
Erwin Rahayu

๐ŸŒ ๐Ÿ“–
Luca
Luca

๐Ÿ’ป
Andrew Hayes
Andrew Hayes

๐Ÿ’ป
Bereket Semagn
Bereket Semagn

๐Ÿ’ป
Lorenzo Lancia
Lorenzo Lancia

๐ŸŒ
Guy Adler
Guy Adler

๐ŸŒ
Dan Bamikiya
Dan Bamikiya

๐Ÿค”
kewang
kewang

๐ŸŒ
Rizda Dwi Prasetya
Rizda Dwi Prasetya

๐Ÿ–‹
AbreuY
AbreuY

๐ŸŒ
>_Rizky.dev
>_Rizky.dev

๐ŸŒ ๐Ÿ“–
Abidemi Harry
Abidemi Harry

๐Ÿ’ป
Marco
Marco

๐ŸŒ
Sam Robbins
Sam Robbins

๐Ÿ“–
alceil
alceil

๐Ÿ’ป
hatsu
hatsu

๐Ÿ’ป
Praveen Kumar Purushothaman
Praveen Kumar Purushothaman

๐ŸŒ

About

๐ŸŽจ Create and share beautiful images of your source code

https://dawnlabs.io/carbon

License:MIT License


Languages

Language:JavaScript 99.9%Language:Shell 0.1%