[![Build Status](https://travis-ci.org/dawnlabs/carbon.svg?branch=master)](https://travis-ci.org/dawnlabs/carbon)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)
[![MIT License](https://img.shields.io/github/license/dawnlabs/carbon.svg)](https://github.com/dawnlabs/carbon/blob/master/LICENSE)
[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/dawnlabs/carbon&env=TWITTER_CONSUMER_KEY&env=TWITTER_CONSUMER_SECRET&env=TWITTER_ACCESS_TOKEN_KEY&env=TWITTER_ACCESS_TOKEN_SECRET&env=LOGS_SECRET_PREFIX)
## Introduction
You know [all](https://twitter.com/dan_abramov/status/890191815567175680) [of](https://twitter.com/reactjs/status/890511993261654017) [those](https://twitter.com/notquiteleo/status/873483329345028096) [code](https://twitter.com/thejameskyle/status/884986927954497536) [screenshots](https://twitter.com/zeithq/status/805779711154647040) 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.
Visit [carbon.now.sh](https://carbon.now.sh) or read [our post](https://dawnlabs.io/blog/carbon/) to learn more about the project.
## Features
* **Import from GitHub gist**. Simply append a GitHub gist id to the url
* **Customization**. Customize things like your image's syntax theme, window style, and more
* **Share quickly**. Save your image or Tweet a link with one click
## Example
## Usage
#### Import
There are a few different ways to import code into Carbon:
- Drop a file onto the editor
- Append a GitHub gist id to the url (e.g. `carbon.now.sh/GIST_ID_HERE`)
- Paste your code directly
#### 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, or padding.
#### Export/Sharing
After you've customized your image you can either Tweet a link to the image, or save it directly.
## Community
Check out these projects our awesome community has created:
- [IntelliJ IDEA `carbon-now-sh`](https://plugins.jetbrains.com/plugin/10469-carbon-now-sh) - Open up the selection in your current IntelliJ IDEA file in Carbon through a context menu
- [Atom `carbon-now-sh`](https://atom.io/packages/carbon-now-sh) - Open up your current Atom file in Carbon with `shift-cmd-A`
- [VS Code `carbon-now-sh`](https://marketplace.visualstudio.com/items?itemName=ericadamski.carbon-now-sh) - Open up your current VS Code file in Carbon with command `carbon`
- [Sublime Text 3 `carbon-now-sh`](https://github.com/molnarmark/carbonSublime) - Open up the selection in your current Sublime Text 3 file with a custom bound key
- [Vim `carbon-now-sh`](https://github.com/kristijanhusak/vim-carbon-now-sh) - Open up the selection in your current Vim/Neovim using function `CarbonNowSh()`
- [Emacs `carbon-now-sh`](https://github.com/veelenga/carbon-now-sh.el) - Open up the selection in your current Emacs using interactive function `carbon-now-sh`
## Contribute
If you have discovered a bug or have a feature suggestion, feel free to create an issue on Github.
If you'd like to make some changes yourself, see the following:
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Make sure yarn is globally installed (`npm install -g yarn`)
3. Run `yarn` to download required packages.
4. Build and start the application: `yarn dev`
5. If you contributed something new, run `yarn contrib:add ` to add yourself [below](#contributors)
6. Finally, submit a [pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) with your changes!
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind are welcome!
### A note on adding themes/languages
We're happy to accept any PRs adding new themes and languages to Carbon! Currently there are a few ways to do so:
1. If the [theme](https://codemirror.net/demo/theme.html) or [language](https://codemirror.net/mode/index.html) is supported in Codemirror, all you have to do is add a [constant](https://github.com/dawnlabs/carbon/blob/master/lib/constants.js) for it.
2. If it's not supported, you can add a Codemirror compliant [custom file](https://github.com/dawnlabs/carbon/tree/master/lib/customModes) to implement it and add a constant like above.
## Thanks To
[ β² ZEIT ](https://zeit.co/) for sponsoring Carbon's hosting.
## Authors
Carbon is a project by
- Mike Fix ([@mfix22](https://github.com/mfix22))
- Brian Dennis ([@briandennis](https://github.com/briandennis))
- Jake Dexheimer ([@jakedex](https://github.com/jakedex))
## Contributors
Thanks goes out to all these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
| [
briandennis](https://github.com/briandennis)
[π»](https://github.com/dawnlabs/carbon/commits?author=briandennis "Code") [π](https://github.com/dawnlabs/carbon/commits?author=briandennis "Documentation") [π](#infra-briandennis "Infrastructure (Hosting, Build-Tools, etc)") [π](#review-briandennis "Reviewed Pull Requests") | [
mfix22](https://github.com/mfix22)
[π¬](#question-mfix22 "Answering Questions") [π»](https://github.com/dawnlabs/carbon/commits?author=mfix22 "Code") [π€](#ideas-mfix22 "Ideas, Planning, & Feedback") | [
jakedex](https://github.com/jakedex)
[π¬](#question-jakedex "Answering Questions") [π»](https://github.com/dawnlabs/carbon/commits?author=jakedex "Code") [π¨](#design-jakedex "Design") [πΉ](#video-jakedex "Videos") | [
andrewda](https://github.com/andrewda)
[π¬](#question-andrewda "Answering Questions") [π»](https://github.com/dawnlabs/carbon/commits?author=andrewda "Code") [π](https://github.com/dawnlabs/carbon/issues?q=author%3Aandrewda "Bug reports") [π](#review-andrewda "Reviewed Pull Requests") | [
yeskunall](https://github.com/yeskunall)
[π»](https://github.com/dawnlabs/carbon/commits?author=yeskunall "Code") [π](https://github.com/dawnlabs/carbon/commits?author=yeskunall "Documentation") [π§](#tool-yeskunall "Tools") [π](https://github.com/dawnlabs/carbon/issues?q=author%3Ayeskunall "Bug reports") | [
stoshfabricius](https://github.com/stoshfabricius)
[π»](https://github.com/dawnlabs/carbon/commits?author=stoshfabricius "Code") | [
jkling38](https://github.com/jkling38)
[π](https://github.com/dawnlabs/carbon/commits?author=jkling38 "Documentation") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [
otobrglez](https://github.com/otobrglez)
[π»](https://github.com/dawnlabs/carbon/commits?author=otobrglez "Code") | [
darahak](https://github.com/darahak)
[π](https://github.com/dawnlabs/carbon/commits?author=darahak "Documentation") | [
dom96](https://github.com/dom96)
[π»](https://github.com/dawnlabs/carbon/commits?author=dom96 "Code") | [
elrumordelaluz](https://github.com/elrumordelaluz)
[π»](https://github.com/dawnlabs/carbon/commits?author=elrumordelaluz "Code") | [
cjb](https://github.com/cjb)
[π»](https://github.com/dawnlabs/carbon/commits?author=cjb "Code") | [
Krzysztof-Cieslak](https://github.com/Krzysztof-Cieslak)
[π»](https://github.com/dawnlabs/carbon/commits?author=Krzysztof-Cieslak "Code") | [
fernahh](https://github.com/fernahh)
[π](https://github.com/dawnlabs/carbon/commits?author=fernahh "Documentation") |
| [
g3r4n](https://github.com/g3r4n)
[π»](https://github.com/dawnlabs/carbon/commits?author=g3r4n "Code") | [
Mat Gadd](http://drarok.com/)
[π](https://github.com/dawnlabs/carbon/issues?q=author%3ADrarok "Bug reports") [π»](https://github.com/dawnlabs/carbon/commits?author=Drarok "Code") | [
Brad Davies](https://bradlab.co.uk)
[π](https://github.com/dawnlabs/carbon/issues?q=author%3Avarbrad "Bug reports") [π»](https://github.com/dawnlabs/carbon/commits?author=varbrad "Code") | [
Rafael CΓ’mara](http://www.rafaelcamaram.com/)
[π»](https://github.com/dawnlabs/carbon/commits?author=rafaelcamaram "Code") | [
Gleb Bahmutov](https://glebbahmutov.com/)
[β οΈ](https://github.com/dawnlabs/carbon/commits?author=bahmutov "Tests") [π§](#tool-bahmutov "Tools") | [
IvΓ‘n MunguΓa](https://ivan-munguia.netlify.com)
[π»](https://github.com/dawnlabs/carbon/commits?author=warborn "Code") | [
Dillon Mulroy](https://dillonmulroy.com)
[π»](https://github.com/dawnlabs/carbon/commits?author=dmmulroy "Code") |
| [
Nihad Abbasov](https://github.com/NARKOZ)
[π»](https://github.com/dawnlabs/carbon/commits?author=NARKOZ "Code") | [
Hugo Torzuoli](https://torzuolih.github.io)
[π](https://github.com/dawnlabs/carbon/commits?author=TorzuoliH "Documentation") | [
Bruno C. Couto](https://github.com/bruno02221)
[π»](https://github.com/dawnlabs/carbon/commits?author=bruno02221 "Code") | [
Mark Molnar](https://github.com/molnarmark)
[π»](https://github.com/dawnlabs/carbon/commits?author=molnarmark "Code") | [
Takahiko Inayama](https://www.behance.net/tetra2000)
[π»](https://github.com/dawnlabs/carbon/commits?author=TETRA2000 "Code") | [
François Martin](https://github.com/martinfrancois)
[π»](https://github.com/dawnlabs/carbon/commits?author=martinfrancois "Code") | [
Raphael Amorim](http://raphamorim.io)
[π»](https://github.com/dawnlabs/carbon/commits?author=raphamorim "Code") |