All Projects → Tyriar → Vscode Theme Generator

Tyriar / Vscode Theme Generator

Licence: mit
Easily generate themes for VS Code with only a few colors

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Vscode Theme Generator

Vscodethemes
Themes for Visual Studio Code
Stars: ✭ 155 (-60.56%)
Mutual labels:  vscode, vscode-theme, themes
Vscode Vlang
V Language extension for Visual Studio Code.
Stars: ✭ 190 (-51.65%)
Mutual labels:  vscode, themes
Awesome Vscode
🎨 A curated list of delightful VS Code packages and resources.
Stars: ✭ 19,659 (+4902.29%)
Mutual labels:  vscode, vscode-theme
Vscode One Monokai
🎨 Vscode One Monokai theme.
Stars: ✭ 214 (-45.55%)
Mutual labels:  vscode, vscode-theme
Lukin Vscode Theme
🎨 Lukin Theme for VS Code
Stars: ✭ 142 (-63.87%)
Mutual labels:  vscode, vscode-theme
Aura Theme
💅 A beautiful dark theme for your favorite apps.
Stars: ✭ 159 (-59.54%)
Mutual labels:  vscode, themes
Code Blue
A carefully concocted dark theme made of subtle blues and bright hues that’s easy on the eyes for focused coding.
Stars: ✭ 215 (-45.29%)
Mutual labels:  vscode, vscode-theme
Vscode Duotone Dark
DuoTone Dark Sea Syntax theme for Visual Studio Code
Stars: ✭ 66 (-83.21%)
Mutual labels:  vscode, vscode-theme
vaporwave-theme-vscode
AESTHETICS
Stars: ✭ 28 (-92.88%)
Mutual labels:  themes, vscode-theme
vscode-theme-dark-blood
🎨 VSCode Theme: Dark Blood
Stars: ✭ 15 (-96.18%)
Mutual labels:  themes, vscode-theme
rouge-theme
VSCode theme created for a dark, material feel with a flushed color palette
Stars: ✭ 36 (-90.84%)
Mutual labels:  themes, vscode-theme
Vscode Solidity Auditor
Solidity language support and visual security auditor for Visual Studio Code
Stars: ✭ 108 (-72.52%)
Mutual labels:  vscode, vscode-theme
Vscode Winteriscoming
Dark theme with fun and bright foreground colors
Stars: ✭ 105 (-73.28%)
Mutual labels:  vscode, vscode-theme
Vscode Iceberg Theme
Dark blue color theme for Visual Studio Code
Stars: ✭ 68 (-82.7%)
Mutual labels:  vscode, vscode-theme
everforest-vscode
Everforest Color Scheme for Visual Studio Code
Stars: ✭ 76 (-80.66%)
Mutual labels:  vscode, vscode-theme
Night Owl Vscode Theme
🌌 NIGHT OWL: A VS Code dark theme for contrast for nighttime coding, 🦉 LIGHT OWL: a daytime light theme
Stars: ✭ 2,368 (+502.54%)
Mutual labels:  vscode, vscode-theme
Vscode Smoothtype
VS Code extension to add cursor transitions while typing, similar to MS Office and the Windows 10 Mail app.
Stars: ✭ 54 (-86.26%)
Mutual labels:  vscode, vscode-theme
Vue Theme Vscode
+200.000 installs ⬇️ Theme for Visual Studio Code inspired by Vue.js, with support for more popular languages, trying to maintain a perfect harmony of colors.
Stars: ✭ 54 (-86.26%)
Mutual labels:  vscode, vscode-theme
ProColors
A collection of coding themes for syntax highlighting and the editors that are designed to be available in dark and light modes with a very high precision of harmony and token definition coverage.
Stars: ✭ 94 (-76.08%)
Mutual labels:  themes, vscode-theme
vscode-snazzy-theme
🎨 VS Code theme based on hyper-snazzy with bright colors
Stars: ✭ 16 (-95.93%)
Mutual labels:  vscode, vscode-theme

vscode-theme-generator

Build Status

This is a preview that leverages the new VS Code theming options in v1.12.

The Problem

  • New themes are typically forked from other themes, carrying the bugs with them
  • .tmThemes are overly verbose and difficult to maintain
  • Themes are difficult to write from scratch

The Solution

What if all you needed to do to generate a theme was specify a few colors and everything else was handled for you? Well that's what this module aims to accomplish. All you need to do is specify a set of "base colors" (background, foreground and 4 accent colors) and you have a reasonably good looking theme.

All other VS Code theme colors are then derived from those base colors, with the option to tweak each underlying color as well.

Example

This is all that's needed to generate a great looking theme:

import { generateTheme, IColorSet } from 'vscode-theme-generator';
const colorSet: IColorSet = {
  base: {
    background: '#12171F',
    foreground: '#EFEFEF',
    color1: '#399EF4',
    color2: '#DA6771',
    color3: '#4EB071',
    color4: '#FFF099',
  }
};
generateTheme('My Theme', colorSet, path.join(__dirname, 'theme.json'));

Getting started

There's a quick start repository that allows you to get started quickly, just clone and run!

git clone https://github.com/Tyriar/vscode-theme-generator-quick-start
cd vscode-theme-generator-quick-start
npm install

Make your changes to the colors in index.ts and hit F5 to build the theme and launch a new VS Code window with your theme available in the command palette (ctrl/cmd+shift+p > "Color Theme").

Advanced use

In addition to the base colors, IColorSet provides more options for syntax, ui, and terminal. There is also an overrides property, which allows you to set any color key from the Theme Color Reference directly.

Since the theme is defined in TypeScript, you can create an object to give names to colors you want to re-use.

import { generateTheme, IColorSet } from 'vscode-theme-generator';

const colors = {
  red: '#DA6771',
  green: '#4EB071',
  yellow: '#FFF099',
  blue: '#399EF4',
  blueLight: '#9FCFF9'
}

const colorSet: IColorSet = {
  base: {
    background: '#12171F',
    foreground: '#EFEFEF',
    color1: colors.blue,
    color2: colors.red,
    color3: colors.green,
    color4: colors.yellow
  },
  syntax: {
    identifier: colors.blueLight,
    string: colors.red
  },
  ui: {
    cursor: '#FFFFFF'
  },
  terminal: {
    blue: colors.blue,
    brightBlue: colors.blueLight
  },
  overrides: {
    'editorGutter.modifiedBackground': colors.green,
    'editorGutter.addedBackground': colors.blue,
    'editorGutter.deletedBackground': colors.red
  }
};

generateTheme('My Theme', colorSet, path.join(__dirname, 'theme.json'));

The syntax properties present a simplified set of token types. If not set, these will be derived from the base colors:

  • color1 determines boolean, identifier, keyword, storage, and cssClass
  • color2 determines string, stringEscape, and cssId
  • color3 determines function, class, classMember, type, and cssTag
  • color4 determines functionCall and number

By default, comment is derived from the background color, and modifier and markdownQuote are not set.

The ui properties allow you to set colors for various highlights and a few other things:

  • cursor: the cursor color
  • invisibles: used for visible whitespace (see the editor.renderWhitespace VS Code setting)
  • guide: indentation guidelines in the editor pane
  • lineHighlight: colors the line your cursor is on, in place of the boundary lines
  • findMatchHighlight and currentFindMatchHighlight: highlights matches from the find widget
  • findRangeHighlight: highlights the selected area for "find in selection"
  • rangeHighlight: background for a selected range of lines
  • selection: highlights text selected with the cursor
  • selectionHighlight: highlights text which matches the selected text
  • wordHighlight: when the cursor is on a symbol, highlights places that symbol is read
  • wordHighlightStrong: when the cursor is on a symbol, highlights places that symbol is written
  • activeLinkForeground: color of hyperlinks when clicked

By default, invisibles and guide are derived from the background color, and the rest are not set.

The terminal properties include each of the standard 16 ANSI colors (black, red, green, yellow, blue, magenta, cyan, and white, plus their "bright" counterparts). To set the background color, add the terminal.background key under overrides.

Support

Support below means that the standard VS Code grammar has explicit support for the languages, ie. the colors should match their meanings. Other languages will probably still look alright but there is no guarantee that they will.

  • ✅ C#
  • ✅ CSS
  • ✅ HTML
  • ✅ Java
  • ✅ JavaScript
  • ✅ Markdown
  • ✅ TypeScript

Roadmap

Below are several of the bigger planned items, community feedback is welcome 😃

  • Support light themes #22
  • Allow styling of text style #16
  • Finalize and commit to API #28
  • Implement syntax color fallbacks #27
  • Refine background fallback values #29
  • Add API documentation #30

Development

npm run watch

Then in VS Code press F5 to build demo and launch the debugger with the generated themes available to switch to.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].