Files
voidraft/frontend/src/views/editor/theme/dark/dracula.ts
2025-11-21 00:03:03 +08:00

111 lines
2.6 KiB
TypeScript

import {Extension} from '@codemirror/state';
import {createBaseTheme} from '../base';
import type {ThemeColors} from '../types';
export const config: ThemeColors = {
themeName: 'dracula',
dark: true,
background: '#282a36',
backgroundSecondary: '#323543',
foreground: '#f8f8f2',
cursor: '#f8f8f2',
selection: '#44475a',
activeLine: '#53576c22',
lineNumber: '#6272a4',
activeLineNumber: '#f8f8f2',
diffInserted: '#50fa7b',
diffDeleted: '#ff5555',
diffChanged: '#f1fa8c',
borderColor: '#191a21',
matchingBracket: '#44475a',
comment: '#6272a4',
lineComment: '#55608c',
blockComment: '#4f597f',
docComment: '#7c89bd',
name: '#f8f8f2',
variableName: '#f8f8f2',
typeName: '#8be9fd',
tagName: '#7de5ff',
propertyName: '#dcdce5',
attributeName: '#fcb5ff',
className: '#9cecff',
labelName: '#ffb86c',
namespace: '#6deeff',
macroName: '#50fa7b',
literal: '#bd93f9',
string: '#f1fa8c',
docString: '#f5ffa9',
character: '#ffec99',
attributeValue: '#ffcf99',
number: '#bd93f9',
integer: '#cfa6ff',
float: '#b48cff',
bool: '#ffb38b',
regexp: '#f1fa8c',
escape: '#f7ffae',
color: '#ffcf99',
url: '#8ae8ff',
keyword: '#ff79c6',
self: '#ff9dd7',
null: '#ff8fb0',
atom: '#bd93f9',
unit: '#bd93f9',
modifier: '#ff90d4',
operatorKeyword: '#ff8bd2',
controlKeyword: '#ff7dc1',
definitionKeyword: '#ff91d1',
moduleKeyword: '#ffacd9',
operator: '#ff79c6',
derefOperator: '#ff91d1',
arithmeticOperator: '#ff88c5',
logicOperator: '#ff8bcf',
bitwiseOperator: '#ff74ba',
compareOperator: '#ff86c6',
updateOperator: '#ff7cbf',
definitionOperator: '#ff6aae',
typeOperator: '#ff98d9',
controlOperator: '#ff6aa6',
punctuation: '#f4ade4',
separator: '#f3a6dc',
bracket: '#cfaefc',
angleBracket: '#ffcff1',
squareBracket: '#ff9fcc',
paren: '#ffb1d8',
brace: '#ff90c1',
content: '#f8f8f2',
heading: '#bd93f9',
heading1: '#d2b3ff',
heading2: '#c7a8ff',
heading3: '#bb9dff',
heading4: '#af92ff',
heading5: '#a387ff',
heading6: '#977cff',
contentSeparator: '#ff79c6',
list: '#c8cbd1',
quote: '#7b86a7',
emphasis: '#f8f8f2',
strong: '#ffffff',
link: '#8be9fd',
monospace: '#dadfde',
strikethrough: '#c2c8d1',
inserted: '#50fa7b',
deleted: '#ff5555',
changed: '#f1fa8c',
invalid: '#ff5555',
meta: '#8791bb',
documentMeta: '#7b84aa',
annotation: '#a7f7d4',
processingInstruction: '#6c7699',
definition: '#d6d9f2',
constant: '#bd93f9',
function: '#50fa7b',
standard: '#bac4d8',
local: '#c3c8da',
special: '#ffd6a5',
};
export const dracula: Extension = createBaseTheme(config);