Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/lowmess/lowmess-prism. PrismJS theme for me to use on my website or whatever
prismjs syntax-theme
Something went wrong. Try again.
lowmess-prism theme.js
2.8 kB · 158 lines
JavaScript
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159const palette = { black: 'hsl(35, 10%, 15%)', gray: 'hsl(35, 10%, 55%)', lightGray: 'hsl(35, 10%, 75%)', white: 'hsl(35, 10%, 95%)', orange: 'hsl(35, 90%, 50%)', red: 'hsl(5, 90%, 70%)', ice: 'hsl(185, 85%, 75%)', blue: 'hsl(215, 85%, 75%)', olive: 'hsl(125, 90%, 75%)', gold: 'hsl(65, 40%, 60%)', lavender: 'hsl(275, 90%, 80%)',
warning: 'hsl(5, 90%, 50%)',}
const theme = { plain: { backgroundColor: palette.black, color: palette.white, direction: 'ltr', textAlign: 'left', whiteSpace: 'pre', wordSpacing: 'normal', wordBreak: 'normal', tabSize: '2', hyphens: 'none', overflow: 'auto', }, styles: [ { types: ['comment', 'prolog', 'doctype', 'cdata'], style: { color: palette.gray, fontStyle: 'italic', }, }, { types: ['atrule', 'punctuation'], style: { color: palette.lightGray, }, }, { types: ['operator'], style: { color: palette.gold, }, }, { types: ['namespace'], style: { opacity: 0.8, }, }, { types: ['keyword'], style: { color: palette.red, }, }, { types: ['class-name'], style: { color: palette.lightGray, }, }, { types: ['class-name'], // `class-name` overrules `tag` in JSX languages: ['jsx', 'tsx'], style: { color: palette.blue, }, }, { types: ['tag'], style: { color: palette.blue, }, }, { types: ['number'], style: { color: palette.ice, }, }, { types: ['attr-name', 'string', 'char', 'builtin', 'inserted'], style: { color: palette.red, }, }, { types: ['string'], languages: ['css', 'sass', 'scss', 'less'], style: { color: palette.olive, }, }, { types: ['variable'], style: { color: palette.lavender, }, }, { types: ['entity'], style: { color: palette.gold, }, }, { types: ['selector', 'attr-value'], style: { color: palette.orange, }, }, { types: ['function'], style: { color: palette.lavender, }, }, { types: ['regex'], style: { color: palette.red, }, }, { types: ['important'], style: { color: palette.warning, fontWeight: '700', }, }, { types: ['bold'], style: { fontWeight: '700', }, }, { types: ['italic'], style: { fontStyle: 'italic', }, }, { types: ['entity'], style: { cursor: 'help', }, }, ],}
export default theme