original-dark.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. // Ref: https://github.com/uiwjs/react-codemirror/blob/bf3b862923d0cb04ccf4bb9da0791bdc7fd6d29b/themes/sublime/src/index.ts
  2. import { tags as t } from '@lezer/highlight';
  3. import { createTheme } from '@uiw/codemirror-themes';
  4. export const originalDark = createTheme({
  5. theme: 'dark',
  6. settings: {
  7. background: '#303841',
  8. foreground: '#FFFFFF',
  9. caret: '#FBAC52',
  10. selection: '#4C5964',
  11. selectionMatch: '#3A546E',
  12. gutterBackground: '#303841',
  13. gutterForeground: '#FFFFFF70',
  14. lineHighlight: '#00000059',
  15. },
  16. styles: [
  17. { tag: [t.meta, t.comment], color: '#A2A9B5' },
  18. { tag: [t.attributeName, t.keyword], color: '#B78FBA' },
  19. { tag: t.function(t.variableName), color: '#5AB0B0' },
  20. { tag: [t.string, t.regexp, t.attributeValue], color: '#99C592' },
  21. { tag: t.operator, color: '#f47954' },
  22. // { tag: t.moduleKeyword, color: 'red' },
  23. { tag: [t.tagName, t.modifier], color: '#E35F63' },
  24. { tag: [t.number, t.definition(t.tagName), t.className, t.definition(t.variableName)], color: '#fbac52' },
  25. { tag: [t.atom, t.bool, t.special(t.variableName)], color: '#E35F63' },
  26. { tag: t.variableName, color: '#539ac4' },
  27. { tag: [t.propertyName, t.typeName], color: '#629ccd' },
  28. { tag: t.propertyName, color: '#36b7b5' },
  29. ],
  30. });