Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Build Status codecov.io

Scheme Sweet

A sweet suite of tools for creating sweet Sublime Text color schemes

Usage

const SchemeSweet = require('./index.js');

var newInstance = new SchemeSweet({
  palette: {
    background: '<color>',
    bg1: '<color>',
    bg2: '<color>',
    bg3: '<color>',
    bg4: '<color>',
    gray: '<color>',
    foreground: '<color>',
    fg1: '<color>',
    fg2: '<color>',
    fg3: '<color>',
    fg4: '<color>',
    red: '<color>',
    green: '<color>',
    blue: '<color>',
    cyan: '<color>',
    pink: '<color>',
    yellow: '<color>',
    orange: '<color>',
    purple: '<color>',
  },
  metadata: {
    name: 'Give your color scheme a name',
    author: 'Give yourself some attribution',
    comment: 'A short but sweet description about your color scheme',
  },
  template: function,
});

Configuration

Your color scheme is configured by passing an object to the SchemeSweet constructor.

Colors

The configuration object must have a palette property which contains the following properties:

background: '<color>',
bg1: '<color>',  // v Darker
bg2: '<color>',  // |
bg3: '<color>',  // |
bg4: '<color>',  // v Lighter

gray: '<color>',

foreground: '<color>',
fg1: '<color>',  // v Darker
fg2: '<color>',  // |
fg3: '<color>',  // |
fg4: '<color>',  // v Lighter

red: '<color>',
green: '<color>',
blue: '<color>',
cyan: '<color>',
pink: '<color>',
yellow: '<color>',
orange: '<color>',
purple: '<color>',

The colors can be further configured by providing optional neutral accent colors:

neutralRed: '<color>',
neutralGreen: '<color>',
neutralBlue: '<color>',
neutralCyan: '<color>',
neutralPink: '<color>',
neutralYellow: '<color>',
neutralOrange: '<color>',
neutralPurple: '<color>',

Colors can be any valid TinyColor color.

Metadata

You can give your color scheme a name, author, and comment by adding a metadata property to the configuration object:

metadata: {
  name: 'Give your color scheme a name',
  author: 'Give yourself some attribution',
  comment: 'A short but sweet description about your color scheme',
},

Templates

The template determines which colors are mapped to what syntax scopes. Scheme Sweet comes with a single default template, but you can also provide your own by adding a template property to the configuration object:

template: function,

Methods

  • SchemeSweet.build() returns your color scheme as plist
  • SchemeSweet.setTemplate([func=defaultTemplate]) set/reset/change the template

License

MIT

About

A sweet suite of tools for creating sweet Sublime Text color schemes

Resources

License

Releases

No releases published
You can’t perform that action at this time.