Skip to content

buildThemeFromColors

This function is a shorthand for creating a theme from a set of colors in a single step. It is useful if you are not willing to modify the scheme object directly.

buildThemeFromColors(config: BuildThemeFromColorsOptions): object

Parameters

NameTypeDescription
configBuildThemeFromColorsOptionsThe configuration object for the theme.

BuildThemeFromColorsOptions

interface BuildThemeFromColorsOptions {
name: string
colors: ColorScheme
isBordered?: boolean
}

Returns

An object representing the theme. (The object is very large, so it is not practical to show it here.)

Example

import { buildThemeFromColors, exampleColors } from 'vs-theme-builder';
const name = 'My Theme';
const theme = buildThemeFromColors({
name,
colors: exampleColors,
isBordered: false
})