https://github.com/maxmx03/dracula.nvim
  
  
    Dracula.nvim is a port of the popular Dracula colorscheme for Neovim, 
    https://github.com/maxmx03/dracula.nvim
  
colorscheme dracula lua neovim neovim-colorscheme neovim-plugin neovim-theme nvim-plugin schemecraft vim vim9
        Last synced: 7 months ago 
        JSON representation
    
Dracula.nvim is a port of the popular Dracula colorscheme for Neovim,
- Host: GitHub
- URL: https://github.com/maxmx03/dracula.nvim
- Owner: maxmx03
- License: mit
- Created: 2023-03-23T23:39:23.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-30T14:16:57.000Z (about 1 year ago)
- Last Synced: 2025-04-06T06:06:58.586Z (7 months ago)
- Topics: colorscheme, dracula, lua, neovim, neovim-colorscheme, neovim-plugin, neovim-theme, nvim-plugin, schemecraft, vim, vim9
- Language: Lua
- Homepage:
- Size: 516 KB
- Stars: 93
- Watchers: 0
- Forks: 5
- Open Issues: 2
- 
            Metadata Files:
            - Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
 
Awesome Lists containing this project
README
          # Dracula
> Created with [schemecraft](https://github.com/maxmx03/schemecraft)

## Installation
To install Dracula, you need a plugin manager. \
In the example, bellow we are going to use lazy.nvim for neovim \
and vim-plug for vim.
### Neovim
Annotations can be enabled. \
Below is an example of how to enable them.
```lua
lspconfig.lua_ls.setup {
  settings = {
    Lua = {
      workspace = {
        checkThirdParty = true,
        library = {
          vim.env.VIMRUNTIME,
          '~/.local/share/nvim/lazy/dracula.nvim',
        },
      },
      -- other settings ...
    },
  },
  capabilities = capabilities,
}
```
```lua
return {
  {
    'maxmx03/dracula.nvim',
    lazy = false,
    priority = 1000,
    config = function ()
      ---@type dracula
      local dracula = require "dracula"
      dracula.setup({
      styles = {
        Type = {},
        Function = {},
        Parameter = {},
        Property = {},
        Comment = {},
        String = {},
        Keyword = {},
        Identifier = {},
        Constant = {},
      },
      transparent = false,
      on_colors = function (colors, color)
        ---@type dracula.palette
        return {
          -- override or create new colors
          mycolor = "#ffffff",
          -- mycolor = 0xffffff,
        }
      end,
      on_highlights = function (colors, color)
        ---@type dracula.highlights
        return {
          ---@type vim.api.keyset.highlight
          Normal = { fg = colors.mycolor }
        }
      end,
      plugins = {
        ["nvim-treesitter"] = true,
        ["rainbow-delimiters"] = true,
        ["nvim-lspconfig"] = true,
        ["nvim-navic"] = true,
        ["nvim-cmp"] = true,
        ["indent-blankline.nvim"] = true,
        ["neo-tree.nvim"] = true,
        ["nvim-tree.lua"] = true,
        ["which-key.nvim"] = true,
        ["dashboard-nvim"] = true,
        ["gitsigns.nvim"] = true,
        ["neogit"] = true,
        ["todo-comments.nvim"] = true,
        ["lazy.nvim"] = true,
        ["telescope.nvim"] = true,
        ["noice.nvim"] = true,
        ["hop.nvim"] = true,
        ["mini.statusline"] = true,
        ["mini.tabline"] = true,
        ["mini.starter"] = true,
        ["mini.cursorword"] = true,
        ['bufferline.nvim'] = true,
      }
      })
      vim.cmd.colorscheme 'dracula'
      vim.cmd.colorscheme 'dracula-soft'
    end
  },
  {
    'nvim-lualine/lualine.nvim',
    opts = {
      options = {
        theme = vim.g.colors_name,
        refresh = {
          statusline = 1000,
        },
      },
    },
  }
}
```
### Vim
- [vim-docs](https://github.com/maxmx03/dracula.nvim/tree/vim)
- [vim9-docs](https://github.com/maxmx03/dracula.nvim/tree/vim9)
## Api
The Dracula provides methods for working with colors. Here are some examples:
```lua
local colors = require 'dracula.colors'
local color = require 'dracula.color'
local darken = color.darken
local lighten = color.lighten
local blend = color.blend
local shade = color.shade
local tint = color.tint
-- example 1: get shades
for i = 1, 10, 1 do
    print(shade(colors.yellow, i))
end
for i = 1, 100, 10 do
    print(darken(colors.yellow, i))
end
-- example 2: get tints
for i = 1, 10, 1 do
    print(tint(colors.yellow, i))
end
for i = 1, 100, 10 do
    print(lighten(colors.yellow, i))
end
-- example 3: blend color
local new_color = blend(colors.yellow, colors.base03, 0.2)
```