Skip to content

Commit af20903

Browse files
committed
fine tuning Dracula theme
1 parent 292c2b8 commit af20903

File tree

2 files changed

+130
-54
lines changed

2 files changed

+130
-54
lines changed

src/menu.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ get_menu_style(int main_theme)
268268
return ST_MENU_STYLE_DBASE;
269269
case 23:
270270
return ST_MENU_STYLE_PERFECT;
271+
case 24:
272+
return ST_MENU_STYLE_DBASE;
271273
default:
272274
return ST_MENU_STYLE_VISION;
273275
}

src/themes.c

Lines changed: 128 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,58 @@ static PspgThemeElement themedef[THEMEDEF_SIZE][2];
6969

7070
static int current_themedef_bank = 0;
7171

72+
73+
typedef enum {
74+
paletteBackground,
75+
paletteBackground2,
76+
paletteCurrentLine,
77+
paletteCurrentLine2,
78+
paletteForeground,
79+
paletteComment,
80+
paletteComment2,
81+
paletteCyan,
82+
paletteGreen,
83+
paletteOrange,
84+
palettePink,
85+
palettePurple,
86+
paletteRed,
87+
paletteYellow,
88+
paletteGrey,
89+
paletteMediumGrey,
90+
paletteSilver,
91+
paletteMediumBlue,
92+
paletteWhite,
93+
paletteBlueZodiac,
94+
paletteDarkYellow,
95+
paletteNone
96+
} rgbThemePaletteColor;
97+
98+
static unsigned int rgbThemePalette[30];
99+
100+
101+
#define rgbtBackground (rgbThemePalette[paletteBackground])
102+
#define rgbtBackground2 (rgbThemePalette[paletteBackground2])
103+
#define rgbtCurrentLine (rgbThemePalette[paletteCurrentLine])
104+
#define rgbtCurrentLine2 (rgbThemePalette[paletteCurrentLine2])
105+
#define rgbtForeground (rgbThemePalette[paletteForeground])
106+
#define rgbtComment (rgbThemePalette[paletteComment])
107+
#define rgbtComment2 (rgbThemePalette[paletteComment2])
108+
#define rgbtCyan (rgbThemePalette[paletteCyan])
109+
#define rgbtGreen (rgbThemePalette[paletteGreen])
110+
#define rgbtOrange (rgbThemePalette[paletteOrange])
111+
#define rgbtPink (rgbThemePalette[palettePink])
112+
#define rgbtPurple (rgbThemePalette[palettePurple])
113+
#define rgbtRed (rgbThemePalette[paletteRed])
114+
#define rgbtYellow (rgbThemePalette[paletteYellow])
115+
#define rgbtGrey (rgbThemePalette[paletteGrey])
116+
#define rgbtMediumGrey (rgbThemePalette[paletteMediumGrey])
117+
#define rgbtSilver (rgbThemePalette[paletteSilver])
118+
#define rgbtMediumBlue (rgbThemePalette[paletteMediumBlue])
119+
#define rgbtWhite (rgbThemePalette[paletteWhite])
120+
#define rgbtBlueZodiac (rgbThemePalette[paletteBlueZodiac])
121+
#define rgbtDarkYellow (rgbThemePalette[paletteDarkYellow])
122+
123+
72124
static PspgStyleDependency
73125
styledep(PspgThemeElements el)
74126
{
@@ -1676,51 +1728,73 @@ initialize_color_pairs(int theme, bool direct_color)
16761728

16771729
case 24:
16781730
/* Dracula theme */
1679-
deftheme_rgb(PspgTheme_background, 0xf8f8f2, 0x282a36, 0);
1680-
deftheme_rgb(PspgTheme_data, 0xf8f8f2, 0x282a36, 0);
1681-
deftheme_rgb(PspgTheme_border, 0x6272a4, 0x282a36, 0);
1682-
deftheme_rgb(PspgTheme_label, 0x50fa7b, 0x282a36, 0);
1683-
deftheme_rgb(PspgTheme_rownum, 0x6272a4, 0x282a36, 0);
1684-
deftheme_rgb(PspgTheme_recnum, 0xff79c6, 0x282a36, A_BOLD);
1685-
deftheme_rgb(PspgTheme_footer, 0xbd93f9, 0x282a36, 0);
1686-
1687-
deftheme_rgb(PspgTheme_cursor_data, 0x282a36, 0xf8f8f2, 0);
1688-
deftheme_rgb(PspgTheme_cursor_border, 0x282a36, 0xf8f8f2, 0);
1689-
deftheme_rgb(PspgTheme_cursor_label, 0x282a36, 0x50fa7b, 0);
1690-
deftheme_rgb(PspgTheme_cursor_rownum, 0x282a36, 0xf8f8f2, 0);
1691-
deftheme_rgb(PspgTheme_cursor_recnum, 0x282a36, 0xff79c6, 0);
1692-
deftheme_rgb(PspgTheme_cursor_footer, 0x282a36, 0xbd93f9, 0);
1693-
1694-
deftheme_rgb(PspgTheme_scrollbar_arrows, 0xf8f8f2, 0x44475a, 0);
1695-
deftheme_rgb(PspgTheme_scrollbar_background, 0x6272a4, 0x44475a, 0);
1696-
deftheme_rgb(PspgTheme_scrollbar_slider, 0xf8f8f2, 0x6272a4, 0);
1697-
deftheme_rgb(PspgTheme_scrollbar_active_slider, 0x282a36, 0xf8f8f2, 0);
1698-
1699-
deftheme_rgb(PspgTheme_title, 0xf8f8f2, 0x44475a, 0);
1700-
deftheme_rgb(PspgTheme_status_bar, 0xf8f8f2, 0x44475a, 0);
1701-
deftheme_rgb(PspgTheme_prompt_bar, 0xf8f8f2, 0x44475a, 0);
1702-
deftheme_rgb(PspgTheme_info_bar, 0x50fa7b, 0x44475a, 0);
1703-
deftheme_rgb(PspgTheme_error_bar, 0xf8f8f2, 0xff5555, 0);
1704-
deftheme_rgb(PspgTheme_input_bar, 0x282a36, 0xf8f8f2, 0);
1705-
1706-
deftheme_rgb(PspgTheme_bookmark, 0x282a36, 0xffb86c, A_BOLD);
1707-
deftheme_rgb(PspgTheme_bookmark_border, 0x6272a4, 0xffb86c, A_BOLD);
1708-
deftheme_rgb(PspgTheme_cursor_bookmark, 0xffb86c, 0x282a36, A_BOLD | A_REVERSE);
1709-
1710-
deftheme_rgb(PspgTheme_cross_cursor, 0x282a36, 0x8be9fd, 0);
1711-
deftheme_rgb(PspgTheme_cross_cursor_border, 0x6272a4, 0x8be9fd, 0);
1712-
1713-
deftheme_rgb(PspgTheme_selection, 0xf8f8f2, 0x44475a, 0);
1714-
deftheme_rgb(PspgTheme_cursor_selection, 0x282a36, 0xf8f8f2, 0);
1715-
1716-
deftheme_rgb(PspgTheme_pattern, 0x282a36, 0xf1fa8c, A_BOLD | A_UNDERLINE);
1717-
deftheme_rgb(PspgTheme_pattern_nohl, 0x6272a4, 0x282a36, 0);
1718-
deftheme_rgb(PspgTheme_pattern_line, 0x282a36, 0xf1fa8c, 0);
1719-
deftheme_rgb(PspgTheme_pattern_line_border, 0x6272a4, 0xf1fa8c, 0);
1720-
deftheme_rgb(PspgTheme_pattern_cursor, 0xf1fa8c, 0x282a36, A_BOLD);
1721-
1722-
deftheme_rgb(PspgTheme_pattern_line_vertical_cursor, 0x282a36, 0xbd93f9, 0);
1723-
deftheme_rgb(PspgTheme_pattern_line_vertical_cursor_border, 0x6272a4, 0xbd93f9, 0);
1731+
rgbtBackground = 0x282a36;
1732+
rgbtCurrentLine = 0x44475a;
1733+
rgbtForeground = 0xf8f8f2;
1734+
rgbtComment = 0x6272a4;
1735+
rgbtCyan = 0x8be9fd;
1736+
rgbtOrange = 0xffb86c;
1737+
rgbtPink = 0xff79c6;
1738+
rgbtPurple = 0xbd93f9;
1739+
rgbtRed = 0xff5555;
1740+
rgbtYellow = 0xf1fa8c;
1741+
rgbtGrey = 0x4e525a;
1742+
rgbtMediumGrey = 0x9b999c;
1743+
rgbtSilver = 0xbdbac5;
1744+
rgbtMediumBlue = 0x4b8fa9;
1745+
rgbtWhite = 0xffffff;
1746+
rgbtBlueZodiac = 0x696c7b;
1747+
rgbtDarkYellow = 0xc0c870;
1748+
1749+
rgbtBackground2 = 0x21222c;
1750+
rgbtCurrentLine2 = 0x363948;
1751+
rgbtComment2 = 0x586693;
1752+
1753+
deftheme_rgb(PspgTheme_background, rgbtForeground, rgbtBackground, 0);
1754+
deftheme_rgb(PspgTheme_data, rgbtForeground, rgbtBackground, 0);
1755+
deftheme_rgb(PspgTheme_border, rgbtMediumGrey, rgbtBackground, 0);
1756+
deftheme_rgb(PspgTheme_label, rgbtSilver, rgbtBackground, A_BOLD);
1757+
deftheme_rgb(PspgTheme_rownum, rgbtMediumGrey, rgbtBackground, 0);
1758+
deftheme_rgb(PspgTheme_recnum, rgbtSilver, rgbtBackground, A_BOLD);
1759+
deftheme_rgb(PspgTheme_footer, rgbtMediumGrey, rgbtBackground, 0);
1760+
1761+
deftheme_rgb(PspgTheme_cursor_data, rgbtForeground, rgbtCurrentLine, 0);
1762+
deftheme_rgb(PspgTheme_cursor_border, rgbtMediumGrey, rgbtCurrentLine, 0);
1763+
deftheme_rgb(PspgTheme_cursor_label, rgbtForeground, rgbtCurrentLine, 0);
1764+
deftheme_rgb(PspgTheme_cursor_rownum, rgbtForeground, rgbtCurrentLine, 0);
1765+
deftheme_rgb(PspgTheme_cursor_recnum, rgbtForeground, rgbtCurrentLine, 0);
1766+
deftheme_rgb(PspgTheme_cursor_footer, rgbtForeground, rgbtCurrentLine, 0);
1767+
1768+
deftheme_rgb(PspgTheme_scrollbar_arrows, rgbtSilver, rgbtBackground, 0);
1769+
deftheme_rgb(PspgTheme_scrollbar_background, rgbtBackground, rgbtBackground, 0);
1770+
deftheme_rgb(PspgTheme_scrollbar_slider, rgbtSilver, rgbtSilver, 0);
1771+
deftheme_rgb(PspgTheme_scrollbar_active_slider, rgbtSilver, rgbtSilver, 0);
1772+
1773+
deftheme_rgb(PspgTheme_title, rgbtForeground, rgbtBackground, A_BOLD);
1774+
deftheme_rgb(PspgTheme_status_bar, rgbtForeground, rgbtBackground, 0);
1775+
deftheme_rgb(PspgTheme_prompt_bar, rgbtForeground, rgbtBackground, 0);
1776+
deftheme_rgb(PspgTheme_info_bar, rgbtForeground, rgbtBackground, A_BOLD);
1777+
deftheme_rgb(PspgTheme_error_bar, rgbtRed, rgbtBackground, A_BOLD);
1778+
deftheme_rgb(PspgTheme_input_bar, rgbtBackground, rgbtForeground, 0);
1779+
1780+
deftheme_rgb(PspgTheme_bookmark, rgbtBackground, rgbtOrange, A_BOLD);
1781+
deftheme_rgb(PspgTheme_bookmark_border, rgbtMediumGrey, rgbtOrange, A_BOLD);
1782+
deftheme_rgb(PspgTheme_cursor_bookmark, rgbtOrange, rgbtCurrentLine, A_BOLD);
1783+
1784+
deftheme_rgb(PspgTheme_cross_cursor, rgbtWhite, rgbtBlueZodiac, 0);
1785+
deftheme_rgb(PspgTheme_cross_cursor_border, rgbtMediumGrey, rgbtBlueZodiac, 0);
1786+
1787+
deftheme_rgb(PspgTheme_selection, rgbtForeground, rgbtComment, 0);
1788+
deftheme_rgb(PspgTheme_cursor_selection, rgbtForeground, rgbtComment, A_REVERSE);
1789+
1790+
deftheme_rgb(PspgTheme_pattern, rgbtBackground, rgbtYellow, A_BOLD);
1791+
deftheme_rgb(PspgTheme_pattern_nohl, rgbtBackground, rgbtYellow, A_BOLD);
1792+
deftheme_rgb(PspgTheme_pattern_line, rgbtCurrentLine, rgbtYellow, 0);
1793+
deftheme_rgb(PspgTheme_pattern_line_border, rgbtMediumGrey, rgbtYellow, 0);
1794+
deftheme_rgb(PspgTheme_pattern_cursor, rgbtWhite, rgbtCurrentLine, A_BOLD);
1795+
1796+
deftheme_rgb(PspgTheme_pattern_line_vertical_cursor, rgbtBackground, rgbtDarkYellow, 0);
1797+
deftheme_rgb(PspgTheme_pattern_line_vertical_cursor_border, rgbtMediumGrey, rgbtDarkYellow, 0);
17241798
break;
17251799
}
17261800

@@ -1846,17 +1920,17 @@ initialize_color_pairs(int theme, bool direct_color)
18461920

18471921
case 24:
18481922
/* Dracula theme */
1849-
deftheme_rgb(PspgTheme_data, 0xf8f8f2, 0x21222c, 0);
1850-
deftheme_rgb(PspgTheme_border, 0x6272a4, 0x21222c, 0);
1851-
deftheme_rgb(PspgTheme_label, 0x50fa7b, 0x21222c, 0);
1923+
deftheme_rgb(PspgTheme_data, rgbtForeground, rgbtBackground2, 0);
1924+
deftheme_rgb(PspgTheme_border, rgbtMediumGrey, rgbtBackground2, 0);
1925+
deftheme_rgb(PspgTheme_label, rgbtSilver, rgbtBackground2, A_BOLD);
18521926

1853-
deftheme_rgb(PspgTheme_cursor_data, 0x282a36, 0xf8f8f2, 0);
1854-
deftheme_rgb(PspgTheme_cursor_border, 0x282a36, 0xf8f8f2, 0);
1855-
deftheme_rgb(PspgTheme_cursor_label, 0x282a36, 0x50fa7b, 0);
1856-
deftheme_rgb(PspgTheme_cursor_rownum, 0x282a36, 0xf8f8f2, 0);
1927+
deftheme_rgb(PspgTheme_cursor_data, rgbtForeground, rgbtCurrentLine2, 0);
1928+
deftheme_rgb(PspgTheme_cursor_border, rgbtMediumGrey, rgbtCurrentLine2, 0);
1929+
deftheme_rgb(PspgTheme_cursor_label, rgbtForeground, rgbtCurrentLine2, 0);
1930+
deftheme_rgb(PspgTheme_cursor_rownum, rgbtForeground, rgbtCurrentLine2, 0);
18571931

1858-
deftheme_rgb(PspgTheme_selection, 0xf8f8f2, 0x44475a, 0);
1859-
deftheme_rgb(PspgTheme_cursor_selection, 0x282a36, 0xf8f8f2, 0);
1932+
deftheme_rgb(PspgTheme_selection, rgbtForeground, rgbtComment2, 0);
1933+
deftheme_rgb(PspgTheme_cursor_selection, rgbtForeground, rgbtComment2, A_REVERSE);
18601934

18611935
has_odd_themedef = true;
18621936
break;

0 commit comments

Comments
 (0)