diff --git a/js/term/screen_parser.js b/js/term/screen_parser.js index 7c128e1..73b8feb 100644 --- a/js/term/screen_parser.js +++ b/js/term/screen_parser.js @@ -90,6 +90,8 @@ module.exports = class ScreenParser { const defBg = du(strArray[ci++]) | (du(strArray[ci++]) << 12) const attributes = du(strArray[ci++]) + console.log(`set colors ${defFg}, ${defBg}, theme ${theme}`) + // theming this.screen.renderer.loadTheme(theme) this.screen.renderer.setDefaultColors(defFg, defBg) diff --git a/js/term/themes.js b/js/term/themes.js index d5a644f..f2bff54 100644 --- a/js/term/themes.js +++ b/js/term/themes.js @@ -24,40 +24,45 @@ const themes = exports.themes = [ '#073642', '#dc322f', '#859900', '#b58900', '#268bd2', '#d33682', '#2aa198', '#eee8d5', '#002b36', '#cb4b16', '#586e75', '#657b83', '#839496', '#6c71c4', '#93a1a1', '#fdf6e3' ], - [ // 6 - Solarized Light - https://github.com/sgerrand/xfce4-terminal-colors-solarized - '#eee8d5', '#dc322f', '#859900', '#b58900', '#268bd2', '#d33682', '#2aa198', '#073642', - '#fdf6e3', '#cb4b16', '#93a1a1', '#839496', '#657b83', '#6c71c4', '#586e75', '#002b36' - ], - [ // 7 - CGA NTSC - wikipedia + [ // 6 - CGA NTSC - wikipedia '#000000', '#69001A', '#117800', '#769100', '#1A00A6', '#8019AB', '#289E76', '#A4A4A4', '#484848', '#C54E76', '#6DD441', '#D2ED46', '#765BFF', '#DC75FF', '#84FAD2', '#FFFFFF' ], - [ // 8 - ZX Spectrum - wikipedia + [ // 7 - ZX Spectrum - wikipedia '#000000', '#aa0000', '#00aa00', '#aaaa00', '#0000aa', '#aa00aa', '#00aaaa', '#aaaaaa', '#000000', '#ff0000', '#00FF00', '#ffff00', '#0000ff', '#ff00ff', '#00ffff', '#ffffff' ], - [ // 9 - Apple II - wikipedia + [ // 8 - Apple II - wikipedia '#000000', '#722640', '#0E5940', '#808080', '#40337F', '#E434FE', '#1B9AFE', '#BFB3FF', '#404C00', '#E46501', '#1BCB01', '#BFCC80', '#808080', '#F1A6BF', '#8DD9BF', '#ffffff' ], - [ // 10 - Commodore - wikipedia + [ // 9 - Commodore - wikipedia '#000000', '#8D3E37', '#55A049', '#AAB95D', '#40318D', '#80348B', '#72C1C8', '#D59F74', '#8B5429', '#B86962', '#94E089', '#FFFFB2', '#8071CC', '#AA5FB6', '#87D6DD', '#ffffff' + ], + [ // 10 - Solarized Light - https://github.com/sgerrand/xfce4-terminal-colors-solarized + '#eee8d5', '#dc322f', '#859900', '#b58900', '#268bd2', '#d33682', '#2aa198', '#073642', + '#fdf6e3', '#cb4b16', '#93a1a1', '#839496', '#657b83', '#6c71c4', '#586e75', '#002b36' + ], + [ // 11 - Solarized Dark High contrast - https://github.com/sgerrand/xfce4-terminal-colors-solarized + '#073642', '#dc322f', '#859900', '#b58900', '#268bd2', '#d33682', '#2aa198', '#fdf6e3', + '#002b36', '#cb4b16', '#657b83', '#839496', '#93a1a1', '#6c71c4', '#eee8d5', '#fdf6e3' ] ] exports.fgbgThemes = [ - ['#AAAAAA', '#000000', 'Lnx', 'Linux'], // GREY_ON_BLACK - ['#EFF0F1', '#31363B', 'Brz', 'Breeze'], // BREEZE - ['#FFFFFF', '#000000', 'W+K', 'White on Black'], // WHITE_ON_BLACK - ['#00FF00', '#000000', 'Lim', 'Lime'], // GREEN_ON_BLACK - ['#E53C00', '#000000', 'Nix', 'Nixie'], // ORANGE_ON_BLACK - ['#FFFFFF', '#300A24', 'Amb', 'Ambiance'], // AMBIENCE - ['#839496', '#002B36', 'SoD', 'Solarized Dark'], // SOLARIZED_DARK - ['#657B83', '#FDF6E3', 'SoL', 'Solarized Light'], // SOLARIZED_LIGHT - ['#000000', '#FFFFDD', 'K+Y', 'Black on Yellow'], // BLACK_ON_YELLOW - ['#000000', '#FFFFFF', 'K+W', 'Black on White'], // BLACK_ON_WHITE - ['#000000', '#FFD75F', 'Wsp', 'Wasp'] // WASP + ['#AAAAAA', '#000000', 'Lnx', 'Linux'], + ['#FFFFFF', '#000000', 'W+K', 'White on Black'], + ['#00FF00', '#000000', 'Lim', 'Lime'], + ['#E53C00', '#000000', 'Nix', 'Nixie'], + ['#EFF0F1', '#31363B', 'Brz', 'Breeze'], + ['#FFFFFF', '#300A24', 'Amb', 'Ambiance'], + ['#839496', '#002B36', 'SoD', 'Solarized Dark'], + ['#93a1a1', '#002b36', 'SoH', 'Solarized Dark (High Contrast)'], + ['#657B83', '#FDF6E3', 'SoL', 'Solarized Light'], + ['#000000', '#FFD75F', 'Wsp', 'Wasp'], + ['#000000', '#FFFFDD', 'K+Y', 'Black on Yellow'], + ['#000000', '#FFFFFF', 'K+W', 'Black on White'] ] let colorTable256 = null diff --git a/pages/cfg_term.php b/pages/cfg_term.php index b30c0cb..13560ee 100644 --- a/pages/cfg_term.php +++ b/pages/cfg_term.php @@ -19,11 +19,12 @@ - - - - - + + + + + +