// lexer_theme.c -- Built-in color themes
//
// Colors ported from the Focus editor theme files.
// Hex values are RGB (alpha channel dropped, always opaque in terminal).

#include "lexer/lexer_theme.h"

S32 g_active_theme_idx = 0;

Theme g_themes[THEME_COUNT] = {

    ////////////////////////////////
    // Default
    // Uses the terminal's own 256-color palette. No background override.
    {
        .name = "Default",
        .use_truecolor  = 0,
        .colors = {
            /* DEFAULT */           RGB_HEX(0xBDBDBD),
            /* COMMENT */           RGB_HEX(0x6A6A6A),
            /* MULTILINE_COMMENT */ RGB_HEX(0x6A6A6A),
            /* STRING_LITERAL */    RGB_HEX(0x6AAF50),
            /* CHAR_LITERAL */      RGB_HEX(0x6AAF50),
            /* NUMBER */            RGB_HEX(0xC678DD),
            /* IDENTIFIER */        RGB_HEX(0xBDBDBD),
            /* FUNCTION */          RGB_HEX(0x56B6C2),
            /* KEYWORD */           RGB_HEX(0xD19A66),
            /* TYPE */              RGB_HEX(0x61AFEF),
            /* VALUE */             RGB_HEX(0xC678DD),
            /* MODIFIER */          RGB_HEX(0xE06C75),
            /* DIRECTIVE */         RGB_HEX(0xE06C75),
            /* PUNCTUATION */       RGB_HEX(0xBDBDBD),
            /* OPERATION */         RGB_HEX(0xBDBDBD),
            /* INVALID */           RGB_HEX(0xFF5555),
        },
        .ansi_colors = {
            /* DEFAULT */           7,
            /* COMMENT */           242,
            /* MULTILINE_COMMENT */ 242,
            /* STRING_LITERAL */    2,
            /* CHAR_LITERAL */      2,
            /* NUMBER */            5,
            /* IDENTIFIER */        7,
            /* FUNCTION */          6,
            /* KEYWORD */           3,
            /* TYPE */              4,
            /* VALUE */             5,
            /* MODIFIER */          1,
            /* DIRECTIVE */         1,
            /* PUNCTUATION */       7,
            /* OPERATION */         7,
            /* INVALID */           9,
        },
        .background    = RGB_HEX(0x1E1E1E),
        .set_background = 0,
        .status_bg     = RGB_HEX(0x252525),
        .status_fg     = RGB_HEX(0xDDDDDD),
        .status_fg_dim = RGB_HEX(0x888888),
        .mb_bg         = RGB_HEX(0x3D5A80),
        .mb_fg         = RGB_HEX(0xFFFFFF),
        .mb_detail     = RGB_HEX(0x888888),
    },

    ////////////////////////////////
    // Default Light
    // Uses the terminal's own 256-color palette with a light background.
    {
        .name = "Default Light",
        .use_truecolor  = 0,
        .colors = {
            /* DEFAULT */           RGB_HEX(0x383A42),
            /* COMMENT */           RGB_HEX(0xA0A1A7),
            /* MULTILINE_COMMENT */ RGB_HEX(0xA0A1A7),
            /* STRING_LITERAL */    RGB_HEX(0xA62C21),
            /* CHAR_LITERAL */      RGB_HEX(0xA62C21),
            /* NUMBER */            RGB_HEX(0x986801),
            /* IDENTIFIER */        RGB_HEX(0x383A42),
            /* FUNCTION */          RGB_HEX(0x0184BC),
            /* KEYWORD */           RGB_HEX(0x4078F2),
            /* TYPE */              RGB_HEX(0x50A14F),
            /* VALUE */             RGB_HEX(0x986801),
            /* MODIFIER */          RGB_HEX(0x4078F2),
            /* DIRECTIVE */         RGB_HEX(0xA62C21),
            /* PUNCTUATION */       RGB_HEX(0x383A42),
            /* OPERATION */         RGB_HEX(0x383A42),
            /* INVALID */           RGB_HEX(0xFF0000),
        },
        .ansi_colors = {
            /* DEFAULT */           0,    // black
            /* COMMENT */           243,  // dark gray
            /* MULTILINE_COMMENT */ 243,
            /* STRING_LITERAL */    1,    // red
            /* CHAR_LITERAL */      1,
            /* NUMBER */            5,    // magenta
            /* IDENTIFIER */        0,    // black
            /* FUNCTION */          6,    // cyan
            /* KEYWORD */           4,    // blue
            /* TYPE */              2,    // green
            /* VALUE */             5,    // magenta
            /* MODIFIER */          4,    // blue
            /* DIRECTIVE */         1,    // red
            /* PUNCTUATION */       0,    // black
            /* OPERATION */         0,    // black
            /* INVALID */           9,    // bright red
        },
        .background    = RGB_HEX(0xFAFAFA),
        .set_background = 0,
        .status_bg     = RGB_HEX(0xD0D0D0),
        .status_fg     = RGB_HEX(0x000000),
        .status_fg_dim = RGB_HEX(0x606060),
        .mb_bg         = RGB_HEX(0x0060C0),
        .mb_fg         = RGB_HEX(0xFFFFFF),
        .mb_detail     = RGB_HEX(0x808080),
    },

    ////////////////////////////////
    // Focus
    // The default Focus editor theme.
    {
        .name = "Focus",
        .use_truecolor  = 1,
        .colors = {
            /* DEFAULT */           RGB_HEX(0xBFC9DB),
            /* COMMENT */           RGB_HEX(0x87919D),
            /* MULTILINE_COMMENT */ RGB_HEX(0x87919D),
            /* STRING_LITERAL */    RGB_HEX(0xD4BC7D),
            /* CHAR_LITERAL */      RGB_HEX(0xD4BC7D),
            /* NUMBER */            RGB_HEX(0xD699B5),
            /* IDENTIFIER */        RGB_HEX(0xBFC9DB),
            /* FUNCTION */          RGB_HEX(0xD0C5A9),
            /* KEYWORD */           RGB_HEX(0xE67D74),
            /* TYPE */              RGB_HEX(0x82AAA3),
            /* VALUE */             RGB_HEX(0xD699B5),
            /* MODIFIER */          RGB_HEX(0xE67D74),
            /* DIRECTIVE */         RGB_HEX(0xE67D74),
            /* PUNCTUATION */       RGB_HEX(0xBFC9DB),
            /* OPERATION */         RGB_HEX(0xE0AD82),
            /* INVALID */           RGB_HEX(0xFF0000),
        },
        .ansi_colors = {},
        .background     = RGB_HEX(0x15212A),
        .set_background = 1,
        .status_bg     = RGB_HEX(0x0C1620),
        .status_fg     = RGB_HEX(0xBFC9DB),
        .status_fg_dim = RGB_HEX(0x607080),
        .mb_bg         = RGB_HEX(0x1C3040),
        .mb_fg         = RGB_HEX(0xBFC9DB),
        .mb_detail     = RGB_HEX(0x607080),
    },

    ////////////////////////////////
    // Handmade Hero
    // Based on Casey Muratori's emacs theme from the Handmade Hero series.
    {
        .name = "Handmade Hero",
        .use_truecolor  = 1,
        .colors = {
            /* DEFAULT */           RGB_HEX(0xCDAA7D),
            /* COMMENT */           RGB_HEX(0x7F7F7F),
            /* MULTILINE_COMMENT */ RGB_HEX(0x87919D),
            /* STRING_LITERAL */    RGB_HEX(0x6B8E23),
            /* CHAR_LITERAL */      RGB_HEX(0x6B8E23),
            /* NUMBER */            RGB_HEX(0xD699B5),
            /* IDENTIFIER */        RGB_HEX(0xBFC9DB),
            /* FUNCTION */          RGB_HEX(0xCDAA7D),
            /* KEYWORD */           RGB_HEX(0xB8860B),
            /* TYPE */              RGB_HEX(0xB8860B),
            /* VALUE */             RGB_HEX(0x6B8E23),
            /* MODIFIER */          RGB_HEX(0xE67D74),
            /* DIRECTIVE */         RGB_HEX(0xE67D74),
            /* PUNCTUATION */       RGB_HEX(0xCDAA7D),
            /* OPERATION */         RGB_HEX(0xCDAA7D),
            /* INVALID */           RGB_HEX(0xFF0000),
        },
        .ansi_colors = {},
        .background     = RGB_HEX(0x161616),
        .set_background = 1,
        .status_bg     = RGB_HEX(0x0C0C0C),
        .status_fg     = RGB_HEX(0xCDAA7D),
        .status_fg_dim = RGB_HEX(0x6B5A3F),
        .mb_bg         = RGB_HEX(0x403020),
        .mb_fg         = RGB_HEX(0xCDAA7D),
        .mb_detail     = RGB_HEX(0x6B5A3F),
    },

    ////////////////////////////////
    // Witness Classic
    // Jonathan Blow's classic color scheme.
    {
        .name = "Witness Classic",
        .use_truecolor  = 1,
        .colors = {
            /* DEFAULT */           RGB_HEX(0xD3B58D),
            /* COMMENT */           RGB_HEX(0xFFFF00),
            /* MULTILINE_COMMENT */ RGB_HEX(0x87919D),
            /* STRING_LITERAL */    RGB_HEX(0xBEBEBE),
            /* CHAR_LITERAL */      RGB_HEX(0xBEBEBE),
            /* NUMBER */            RGB_HEX(0xD699B5),
            /* IDENTIFIER */        RGB_HEX(0xBFC9DB),
            /* FUNCTION */          RGB_HEX(0xD3B58D),
            /* KEYWORD */           RGB_HEX(0xFFFFFF),
            /* TYPE */              RGB_HEX(0x98FB98),
            /* VALUE */             RGB_HEX(0x7FFFD4),
            /* MODIFIER */          RGB_HEX(0xE67D74),
            /* DIRECTIVE */         RGB_HEX(0xE67D74),
            /* PUNCTUATION */       RGB_HEX(0xD3B58D),
            /* OPERATION */         RGB_HEX(0xD3B58D),
            /* INVALID */           RGB_HEX(0xFF0000),
        },
        .ansi_colors = {},
        .background     = RGB_HEX(0x292929),
        .set_background = 1,
        .status_bg     = RGB_HEX(0x222222),
        .status_fg     = RGB_HEX(0xDDDDDD),
        .status_fg_dim = RGB_HEX(0x888888),
        .mb_bg         = RGB_HEX(0x3A3A50),
        .mb_fg         = RGB_HEX(0xFFFFFF),
        .mb_detail     = RGB_HEX(0x888888),
    },

    ////////////////////////////////
    // Witness
    // Jonathan Blow's alternative dark-teal theme.
    {
        .name = "Witness",
        .use_truecolor  = 1,
        .colors = {
            /* DEFAULT */           RGB_HEX(0xD3B58D),
            /* COMMENT */           RGB_HEX(0x3DDF23),
            /* MULTILINE_COMMENT */ RGB_HEX(0x87919D),
            /* STRING_LITERAL */    RGB_HEX(0x0FDFAF),
            /* CHAR_LITERAL */      RGB_HEX(0x0FDFAF),
            /* NUMBER */            RGB_HEX(0xD699B5),
            /* IDENTIFIER */        RGB_HEX(0xBFC9DB),
            /* FUNCTION */          RGB_HEX(0xD3B58D),
            /* KEYWORD */           RGB_HEX(0xFFFFFF),
            /* TYPE */              RGB_HEX(0x98FB98),
            /* VALUE */             RGB_HEX(0x7FFFD4),
            /* MODIFIER */          RGB_HEX(0xE67D74),
            /* DIRECTIVE */         RGB_HEX(0xE67D74),
            /* PUNCTUATION */       RGB_HEX(0xD3B58D),
            /* OPERATION */         RGB_HEX(0xE0AD82),
            /* INVALID */           RGB_HEX(0xFF0000),
        },
        .ansi_colors = {},
        .background     = RGB_HEX(0x072626),
        .set_background = 1,
        .status_bg     = RGB_HEX(0x041818),
        .status_fg     = RGB_HEX(0xD3B58D),
        .status_fg_dim = RGB_HEX(0x6B7A6B),
        .mb_bg         = RGB_HEX(0x0E3A3A),
        .mb_fg         = RGB_HEX(0xD3B58D),
        .mb_detail     = RGB_HEX(0x6B7A6B),
    },

    ////////////////////////////////
    // Visual Studio Classic
    // Light theme matching Visual Studio 6.0 (1998).
    {
        .name = "VS Classic",
        .use_truecolor  = 1,
        .colors = {
            /* DEFAULT */           RGB_HEX(0x000000),
            /* COMMENT */           RGB_HEX(0x008000),
            /* MULTILINE_COMMENT */ RGB_HEX(0x008000),
            /* STRING_LITERAL */    RGB_HEX(0x800000),
            /* CHAR_LITERAL */      RGB_HEX(0x800000),
            /* NUMBER */            RGB_HEX(0x000000),
            /* IDENTIFIER */        RGB_HEX(0x000000),
            /* FUNCTION */          RGB_HEX(0x000000),
            /* KEYWORD */           RGB_HEX(0x0000FF),
            /* TYPE */              RGB_HEX(0x0000FF),
            /* VALUE */             RGB_HEX(0x0000FF),
            /* MODIFIER */          RGB_HEX(0x0000FF),
            /* DIRECTIVE */         RGB_HEX(0x0000FF),
            /* PUNCTUATION */       RGB_HEX(0x000000),
            /* OPERATION */         RGB_HEX(0x000000),
            /* INVALID */           RGB_HEX(0xFF0000),
        },
        .ansi_colors = {},
        .background     = RGB_HEX(0xFFFFFF),
        .set_background = 1,
        .status_bg     = RGB_HEX(0xD4D0C8),
        .status_fg     = RGB_HEX(0x000000),
        .status_fg_dim = RGB_HEX(0x606060),
        .mb_bg         = RGB_HEX(0x0A246A),
        .mb_fg         = RGB_HEX(0xFFFFFF),
        .mb_detail     = RGB_HEX(0xA0A0A0),
        .fb_bg         = RGB_HEX(0xFFFFFF),
        .set_fb_bg     = 1,
    },

    ////////////////////////////////
    // RAD Debugger
    // Default color scheme from the RAD Debugger project.
    {
        .name = "RAD Debugger",
        .use_truecolor  = 1,
        .colors = {
            /* DEFAULT */           RGB_HEX(0xDADADA),
            /* COMMENT */           RGB_HEX(0x5D7856),
            /* MULTILINE_COMMENT */ RGB_HEX(0x5D7856),
            /* STRING_LITERAL */    RGB_HEX(0xFFA070),
            /* CHAR_LITERAL */      RGB_HEX(0xFFA070),
            /* NUMBER */            RGB_HEX(0xD0D0A0),
            /* IDENTIFIER */        RGB_HEX(0xDADADA),
            /* FUNCTION */          RGB_HEX(0xDADADA),
            /* KEYWORD */           RGB_HEX(0xF0C674),
            /* TYPE */              RGB_HEX(0x70C0B0),
            /* VALUE */             RGB_HEX(0xD0D0A0),
            /* MODIFIER */          RGB_HEX(0xF0C674),
            /* DIRECTIVE */         RGB_HEX(0xCC7070),
            /* PUNCTUATION */       RGB_HEX(0xDADADA),
            /* OPERATION */         RGB_HEX(0xDADADA),
            /* INVALID */           RGB_HEX(0xFF0000),
        },
        .ansi_colors = {},
        .background     = RGB_HEX(0x1C1C1C),
        .set_background = 1,
        .status_bg     = RGB_HEX(0x121212),
        .status_fg     = RGB_HEX(0xDADADA),
        .status_fg_dim = RGB_HEX(0x707070),
        .mb_bg         = RGB_HEX(0x3A2A1A),
        .mb_fg         = RGB_HEX(0xDADADA),
        .mb_detail     = RGB_HEX(0x707070),
    },

    ////////////////////////////////
    // 4coder
    // Default theme from Allen Webster's 4coder editor.
    {
        .name = "4coder",
        .use_truecolor  = 1,
        .colors = {
            /* DEFAULT */           RGB_HEX(0x90B080),
            /* COMMENT */           RGB_HEX(0x2090F0),
            /* MULTILINE_COMMENT */ RGB_HEX(0x2090F0),
            /* STRING_LITERAL */    RGB_HEX(0x50FF30),
            /* CHAR_LITERAL */      RGB_HEX(0x50FF30),
            /* NUMBER */            RGB_HEX(0x50FF30),
            /* IDENTIFIER */        RGB_HEX(0x90B080),
            /* FUNCTION */          RGB_HEX(0x90B080),
            /* KEYWORD */           RGB_HEX(0xD08F20),
            /* TYPE */              RGB_HEX(0xD08F20),
            /* VALUE */             RGB_HEX(0x50FF30),
            /* MODIFIER */          RGB_HEX(0xD08F20),
            /* DIRECTIVE */         RGB_HEX(0xFF5F5F),
            /* PUNCTUATION */       RGB_HEX(0x90B080),
            /* OPERATION */         RGB_HEX(0x90B080),
            /* INVALID */           RGB_HEX(0xFF0000),
        },
        .ansi_colors = {},
        .background     = RGB_HEX(0x0C0C0C),
        .set_background = 1,
        .status_bg     = RGB_HEX(0x1A1A1A),
        .status_fg     = RGB_HEX(0x90B080),
        .status_fg_dim = RGB_HEX(0x506050),
        .mb_bg         = RGB_HEX(0x2A3A20),
        .mb_fg         = RGB_HEX(0x90B080),
        .mb_detail     = RGB_HEX(0x606060),
    },

    ////////////////////////////////
    // Ryan Fleury
    // Ryan Fleury's personal theme, ported from the fleury-theme.el emacs package.
    {
        .name = "Ryan Fleury",
        .use_truecolor  = 1,
        .colors = {
            /* DEFAULT */           RGB_HEX(0xB99468),
            /* COMMENT */           RGB_HEX(0x666666),
            /* MULTILINE_COMMENT */ RGB_HEX(0x666666),
            /* STRING_LITERAL */    RGB_HEX(0xFFAA00),
            /* CHAR_LITERAL */      RGB_HEX(0xFFAA00),
            /* NUMBER */            RGB_HEX(0xFFAA00),
            /* IDENTIFIER */        RGB_HEX(0xB99468),
            /* FUNCTION */          RGB_HEX(0xDE451F),
            /* KEYWORD */           RGB_HEX(0xF0C674),
            /* TYPE */              RGB_HEX(0xEDB211),
            /* VALUE */             RGB_HEX(0xFFAA00),
            /* MODIFIER */          RGB_HEX(0xF0C674),
            /* DIRECTIVE */         RGB_HEX(0xDC7575),
            /* PUNCTUATION */       RGB_HEX(0xB99468),
            /* OPERATION */         RGB_HEX(0xB99468),
            /* INVALID */           RGB_HEX(0xFF0000),
        },
        .ansi_colors = {},
        .background     = RGB_HEX(0x020202),
        .set_background = 1,
        .status_bg     = RGB_HEX(0x1A120B),
        .status_fg     = RGB_HEX(0xE7AA4D),
        .status_fg_dim = RGB_HEX(0x63523D),
        .mb_bg         = RGB_HEX(0x3A2510),
        .mb_fg         = RGB_HEX(0xE7AA4D),
        .mb_detail     = RGB_HEX(0x63523D),
    },

    ////////////////////////////////
    // Gruber Darker
    // Gruber Darker theme by Alexey Kutepov (rexim).
    {
        .name = "Gruber Darker",
        .use_truecolor  = 1,
        .colors = {
            /* DEFAULT */           RGB_HEX(0xE4E4EF),
            /* COMMENT */           RGB_HEX(0x565F73),
            /* MULTILINE_COMMENT */ RGB_HEX(0x565F73),
            /* STRING_LITERAL */    RGB_HEX(0x73C936),
            /* CHAR_LITERAL */      RGB_HEX(0x73C936),
            /* NUMBER */            RGB_HEX(0xFFDD33),
            /* IDENTIFIER */        RGB_HEX(0xE4E4EF),
            /* FUNCTION */          RGB_HEX(0x96A6C8),
            /* KEYWORD */           RGB_HEX(0xFFDD33),
            /* TYPE */              RGB_HEX(0x96A6C8),
            /* VALUE */             RGB_HEX(0xFFDD33),
            /* MODIFIER */          RGB_HEX(0x9E95C7),
            /* DIRECTIVE */         RGB_HEX(0x9E95C7),
            /* PUNCTUATION */       RGB_HEX(0xE4E4EF),
            /* OPERATION */         RGB_HEX(0xE4E4EF),
            /* INVALID */           RGB_HEX(0xF43841),
        },
        .ansi_colors = {},
        .background     = RGB_HEX(0x181818),
        .set_background = 1,
        .status_bg     = RGB_HEX(0x101010),
        .status_fg     = RGB_HEX(0xE4E4EF),
        .status_fg_dim = RGB_HEX(0x565F73),
        .mb_bg         = RGB_HEX(0x282828),
        .mb_fg         = RGB_HEX(0xE4E4EF),
        .mb_detail     = RGB_HEX(0x95A99F),
    },

    ////////////////////////////////
    // VS Dark
    // Visual Studio Dark theme.
    {
        .name = "VS Dark",
        .use_truecolor  = 1,
        .colors = {
            /* DEFAULT */           RGB_HEX(0xDCDCAA),
            /* COMMENT */           RGB_HEX(0x6A9955),
            /* MULTILINE_COMMENT */ RGB_HEX(0x6A9955),
            /* STRING_LITERAL */    RGB_HEX(0xCE9178),
            /* CHAR_LITERAL */      RGB_HEX(0xCE9178),
            /* NUMBER */            RGB_HEX(0xB5CEA8),
            /* IDENTIFIER */        RGB_HEX(0x9CDCFE),
            /* FUNCTION */          RGB_HEX(0xDCDCAA),
            /* KEYWORD */           RGB_HEX(0x569CD6),
            /* TYPE */              RGB_HEX(0x4EC9B0),
            /* VALUE */             RGB_HEX(0x569CD6),
            /* MODIFIER */          RGB_HEX(0x569CD6),
            /* DIRECTIVE */         RGB_HEX(0xC586C0),
            /* PUNCTUATION */       RGB_HEX(0xD4D4D4),
            /* OPERATION */         RGB_HEX(0xD4D4D4),
            /* INVALID */           RGB_HEX(0xFF0000),
        },
        .ansi_colors = {},
        .background     = RGB_HEX(0x1E1E1E),
        .set_background = 1,
        .status_bg     = RGB_HEX(0x252526),
        .status_fg     = RGB_HEX(0xCCCCCC),
        .status_fg_dim = RGB_HEX(0x808080),
        .mb_bg         = RGB_HEX(0x094771),
        .mb_fg         = RGB_HEX(0xFFFFFF),
        .mb_detail     = RGB_HEX(0x808080),
    },

    ////////////////////////////////
    // Freshcut Contrast
    // High-contrast dark theme by Dayle Rees.
    {
        .name = "Freshcut Contrast",
        .use_truecolor  = 1,
        .colors = {
            /* DEFAULT */           RGB_HEX(0xF8F8F2),
            /* COMMENT */           RGB_HEX(0x737B84),
            /* MULTILINE_COMMENT */ RGB_HEX(0x737B84),
            /* STRING_LITERAL */    RGB_HEX(0xE9EE00),
            /* CHAR_LITERAL */      RGB_HEX(0xE9EE00),
            /* NUMBER */            RGB_HEX(0x8FBE00),
            /* IDENTIFIER */        RGB_HEX(0xF8F8F2),
            /* FUNCTION */          RGB_HEX(0xAEE239),
            /* KEYWORD */           RGB_HEX(0xC8D7E8),
            /* TYPE */              RGB_HEX(0x4ECDC4),
            /* VALUE */             RGB_HEX(0x8FBE00),
            /* MODIFIER */          RGB_HEX(0x00A8C6),
            /* DIRECTIVE */         RGB_HEX(0x00A8C6),
            /* PUNCTUATION */       RGB_HEX(0xF8F8F2),
            /* OPERATION */         RGB_HEX(0xF8F8F2),
            /* INVALID */           RGB_HEX(0xFF0000),
        },
        .ansi_colors = {},
        .background     = RGB_HEX(0x000000),
        .set_background = 1,
        .status_bg     = RGB_HEX(0x3C3C3C),
        .status_fg     = RGB_HEX(0xE0E0E0),
        .status_fg_dim = RGB_HEX(0x808080),
        .mb_bg         = RGB_HEX(0x505050),
        .mb_fg         = RGB_HEX(0xFFFFFF),
        .mb_detail     = RGB_HEX(0x909090),
    },
};
