├── colors.png ├── screenshot.png ├── package.json ├── index.js ├── LICENSE ├── README.md ├── INSTALL.md └── colors.js /colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dracula/tailwind/HEAD/colors.png -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dracula/tailwind/HEAD/screenshot.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tailwind-dracula", 3 | "version": "1.1.1", 4 | "description": "A super tiny tailwind plugin that enables the use of the Dracula colour palette.", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/dracula/tailwind.git" 12 | }, 13 | "keywords": [ 14 | "package", 15 | "tailwind", 16 | "tailwindcss", 17 | "dracula", 18 | "colors", 19 | "theme" 20 | ], 21 | "author": "Nick Graffis", 22 | "license": "MIT", 23 | "bugs": { 24 | "url": "https://github.com/dracula/tailwind/issues" 25 | }, 26 | "peerDependencies": { 27 | "tailwindcss": "2.x || 3.x || 4.x" 28 | }, 29 | "homepage": "https://draculatheme.com/tailwind" 30 | } 31 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const plugin = require('tailwindcss/plugin') 2 | const baseColors = require('./colors') 3 | 4 | module.exports = function (prefix, hard = false) { 5 | let module = plugin(function({ theme }) { 6 | 7 | }, { 8 | theme: { 9 | extend: { 10 | colors: theme => ({ 11 | ...(() => { 12 | const returnColors = {} 13 | Object.keys(baseColors).forEach((key, index) => { 14 | if (index < 10) returnColors[ 15 | prefix ? prefix + `-${key}` : key 16 | ] = baseColors[key] 17 | else returnColors[ 18 | prefix && hard ? prefix + `-${key}` : key 19 | ] = baseColors[key] 20 | }) 21 | return returnColors 22 | })() 23 | }) 24 | } 25 | } 26 | }) 27 | 28 | return module; 29 | } 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Nick Graffis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | Logo 4 | 5 | 6 | 7 | 8 |

9 | 10 | # Dracula for [Tailwind](https://tailwindcss.com) 11 | 12 | > A dark theme for [Tailwind](https://tailwindcss.com). 13 | 14 | ## Install 15 | 16 | All instructions can be found at [draculatheme.com/tailwind](https://draculatheme.com/tailwind). 17 | 18 | ## Team 19 | 20 | This theme is maintained by the following person(s) and a bunch of [awesome contributors](https://github.com/dracula/tailwind/graphs/contributors). 21 | 22 | | [![Nick Graffis](https://github.com/nickgraffis.png?size=100)](https://github.com/nickgraffis) | 23 | | ---------------------------------------------------------------------------------------------- | 24 | | [Nick Graffis](https://github.com/nickgraffis) | 25 | 26 | ## Community 27 | 28 | - [Twitter](https://twitter.com/draculatheme) - Best for getting updates about themes and new stuff. 29 | - [GitHub](https://github.com/dracula/dracula-theme/discussions) - Best for asking questions and discussing issues. 30 | - [Discord](https://draculatheme.com/discord-invite) - Best for hanging out with the community. 31 | 32 | ## License 33 | 34 | [MIT License](./LICENSE) 35 | -------------------------------------------------------------------------------- /INSTALL.md: -------------------------------------------------------------------------------- 1 | ### [Tailwind](https://tailwindcss.com) 2 | 3 | A super tiny tailwind plugin that enables the use of the Dracula colour palette. 4 | 5 | Hopefully this will give you some great dark colors in your next project, and save you 5 min of setting up custom colors. 6 | 7 | #### Installation 8 | 9 | ``` 10 | npm i tailwind-dracula --save-dev 11 | ``` 12 | 13 | #### Usage 14 | 15 | In your tailwind.config.js: 16 | 17 | ```js 18 | plugins: [ 19 | require('tailwind-dracula')(), 20 | ], 21 | ``` 22 | 23 | You now have access to the Dracula theme anywhere you would use normally tailwind colours. 24 | 25 | ```html 26 |
27 |

I vant to suck your blood...

28 |
29 | ``` 30 | 31 | Color naming has two options (based on Dracula's names with some changes where needed): 32 | * The color name option. ie. darker, pink, purple 33 | * The vampire name option. ie. dracula, vonCount, buffy 34 | 35 | > The default color names for Dracula can override the tailwind default style names. 36 | 37 | #### Prefixing color names 38 | By default the plugin accepts a prefix that can be used for the color name options (to avoid clashes with tailwind defaults). 39 | ```js 40 | plugins: [ 41 | require('tailwind-dracula')('dracula'), 42 | ], 43 | ``` 44 | Then use the color name option with the dracula prefix, but use the vampire name options without the prefix 45 | ```html 46 |
47 |

I vant to suck your blood...

48 |

Tailwind is cool...

//still works! 49 |
50 | ``` 51 | 52 | You can also add the prefix for ALL names by passing `true` into the second parameter. 53 | ```js 54 | plugins: [ 55 | require('tailwind-dracula')('dracula', true), 56 | ], 57 | ``` 58 | Now all colors within dracula will require the dracula prefix 59 | ```html 60 |
//works! 61 |

I vant to suck your blood...

//doesn't work! 62 |

Flesh of my flesh...

//works! 63 |

Tailwind is cool...

//still works! 64 |
65 | ``` 66 | 67 | #### Changing color names 68 | 69 | You can just pull in some of the colors and add them to tailwind 70 | ``` 71 | const dracula = require('tailwind-dracula/colors') 72 | 73 | theme: { 74 | extend: { 75 | colors: { 76 | ...dracula //adds all the colors 77 | pinkish: dracula.buffy //just adds buffy with the name 'pinkish' 78 | } 79 | } 80 | }, 81 | ``` 82 | 83 | #### Full Color Palette 84 | 85 | You can also access a full range of color options (50 - 900) outside of the default colors: [All Colors](https://github.com/dracula/tailwind/blob/readme-update/colors.js). 86 | 87 | ![Full Colors](https://github.com/dracula/tailwind/blob/readme-update/colors.png?raw=true) 88 | -------------------------------------------------------------------------------- /colors.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | darker: { 3 | '50': '#cdd0e4', 4 | '100': '#b5bad6', 5 | '200': '#9ea4c8', 6 | '300': '#888fb8', 7 | '400': '#727aa8', 8 | '500': '#5f6795', 9 | '600': '#53597c', 10 | '700': '#454a64', 11 | '800': '#373a4d', 12 | '900': '#282a36', 13 | DEFAULT: '#282a36' 14 | }, 15 | dark: { 16 | '50': '#f7f7fb', 17 | '100': '#dfe1ed', 18 | '200': '#c7cadf', 19 | '300': '#b1b5d0', 20 | '400': '#9ba0c0', 21 | '500': '#858bb0', 22 | '600': '#71779f', 23 | '700': '#606689', 24 | '800': '#525771', 25 | '900': '#44475a', 26 | DEFAULT: '#44475a' 27 | }, 28 | light: { 29 | '50': '#f8f8f2', 30 | '100': '#eaeada', 31 | '200': '#dcdcc3', 32 | '300': '#cdcdac', 33 | '400': '#bdbd96', 34 | '500': '#adad81', 35 | '600': '#9c9c6c', 36 | '700': '#85855d', 37 | '800': '#6d6d4f', 38 | '900': '#565641', 39 | DEFAULT: '#f8f8f2' 40 | }, 41 | blue: { 42 | '50': '#f0f2f8', 43 | '100': '#d7dcec', 44 | '200': '#bec6df', 45 | '300': '#a6b0d1', 46 | '400': '#8f9bc3', 47 | '500': '#7886b4', 48 | '600': '#6272a4', 49 | '700': '#54628c', 50 | '800': '#485273', 51 | '900': '#3b425a', 52 | DEFAULT: '#6272a4' 53 | }, 54 | cyan: { 55 | '50': '#fafeff', 56 | '100': '#d4f8ff', 57 | '200': '#aff0fe', 58 | '300': '#8be9fd', 59 | '400': '#67e1fb', 60 | '500': '#44d9f8', 61 | '600': '#22d0f5', 62 | '700': '#0dbfe5', 63 | '800': '#0ca0bf', 64 | '900': '#0c819a', 65 | DEFAULT: '#8be9fd' 66 | }, 67 | green: { 68 | '50': '#e2ffe9', 69 | '100': '#bcffcd', 70 | '200': '#97feb1', 71 | '300': '#73fc96', 72 | '400': '#50fa7b', 73 | '500': '#2df760', 74 | '600': '#0cf346', 75 | '700': '#0ccd3d', 76 | '800': '#0ba833', 77 | '900': '#0a8329', 78 | DEFAULT: '#50fa7b' 79 | }, 80 | orange: { 81 | '50': '#ffefdd', 82 | '100': '#ffdcb7', 83 | '200': '#ffca92', 84 | '300': '#ffb86c', 85 | '400': '#fda648', 86 | '500': '#fb9325', 87 | '600': '#f38107', 88 | '700': '#cd6d08', 89 | '800': '#a75a08', 90 | '900': '#824707', 91 | DEFAULT: '#ffb86c' 92 | }, 93 | pink: { 94 | '50': '#ffeaf6', 95 | '100': '#ffc4e6', 96 | '200': '#ff9fd6', 97 | '300': '#ff79c6', 98 | '400': '#fd55b6', 99 | '500': '#fb31a5', 100 | '600': '#f80e95', 101 | '700': '#d90880', 102 | '800': '#b3086b', 103 | '900': '#8e0855', 104 | DEFAULT: '#ff79c6' 105 | }, 106 | purple: { 107 | '50': '#fefeff', 108 | '100': '#e9dafe', 109 | '200': '#d3b6fc', 110 | '300': '#bd93f9', 111 | '400': '#a771f6', 112 | '500': '#924ff2', 113 | '600': '#7d2eed', 114 | '700': '#6916e0', 115 | '800': '#5914bb', 116 | '900': '#491298', 117 | DEFAULT: '#bd93f9' 118 | }, 119 | red: { 120 | '50': '#ffecec', 121 | '100': '#ffc6c6', 122 | '200': '#ffa0a0', 123 | '300': '#ff7b7b', 124 | '400': '#ff5555', 125 | '500': '#fd3131', 126 | '600': '#fb0e0e', 127 | '700': '#dd0606', 128 | '800': '#b70707', 129 | '900': '#910707', 130 | DEFAULT: '#ff5555' 131 | }, 132 | yellow: { 133 | '50': '#fefff8', 134 | '100': '#fafed3', 135 | '200': '#f6fcaf', 136 | '300': '#f1fa8c', 137 | '400': '#ebf769', 138 | '500': '#e5f347', 139 | '600': '#dfef26', 140 | '700': '#ccdd12', 141 | '800': '#abb811', 142 | '900': '#899410', 143 | DEFAULT: '#f1fa8c' 144 | }, 145 | nosferatu: { 146 | '50': '#cdd0e4', 147 | '100': '#b5bad6', 148 | '200': '#9ea4c8', 149 | '300': '#888fb8', 150 | '400': '#727aa8', 151 | '500': '#5f6795', 152 | '600': '#53597c', 153 | '700': '#454a64', 154 | '800': '#373a4d', 155 | '900': '#282a36', 156 | DEFAULT: '#282a36' 157 | }, 158 | aro: { 159 | '50': '#f7f7fb', 160 | '100': '#dfe1ed', 161 | '200': '#c7cadf', 162 | '300': '#b1b5d0', 163 | '400': '#9ba0c0', 164 | '500': '#858bb0', 165 | '600': '#71779f', 166 | '700': '#606689', 167 | '800': '#525771', 168 | '900': '#44475a', 169 | DEFAULT: '#44475a' 170 | }, 171 | cullen: { 172 | '50': '#f8f8f2', 173 | '100': '#eaeada', 174 | '200': '#dcdcc3', 175 | '300': '#cdcdac', 176 | '400': '#bdbd96', 177 | '500': '#adad81', 178 | '600': '#9c9c6c', 179 | '700': '#85855d', 180 | '800': '#6d6d4f', 181 | '900': '#565641', 182 | DEFAULT: '#f8f8f2' 183 | }, 184 | vonCount: { 185 | '50': '#f0f2f8', 186 | '100': '#d7dcec', 187 | '200': '#bec6df', 188 | '300': '#a6b0d1', 189 | '400': '#8f9bc3', 190 | '500': '#7886b4', 191 | '600': '#6272a4', 192 | '700': '#54628c', 193 | '800': '#485273', 194 | '900': '#3b425a', 195 | DEFAULT: '#6272a4' 196 | }, 197 | vanHelsing: { 198 | '50': '#fafeff', 199 | '100': '#d4f8ff', 200 | '200': '#aff0fe', 201 | '300': '#8be9fd', 202 | '400': '#67e1fb', 203 | '500': '#44d9f8', 204 | '600': '#22d0f5', 205 | '700': '#0dbfe5', 206 | '800': '#0ca0bf', 207 | '900': '#0c819a', 208 | DEFAULT: '#8be9fd' 209 | }, 210 | blade: { 211 | '50': '#e2ffe9', 212 | '100': '#bcffcd', 213 | '200': '#97feb1', 214 | '300': '#73fc96', 215 | '400': '#50fa7b', 216 | '500': '#2df760', 217 | '600': '#0cf346', 218 | '700': '#0ccd3d', 219 | '800': '#0ba833', 220 | '900': '#0a8329', 221 | DEFAULT: '#50fa7b' 222 | }, 223 | morbius: { 224 | '50': '#ffefdd', 225 | '100': '#ffdcb7', 226 | '200': '#ffca92', 227 | '300': '#ffb86c', 228 | '400': '#fda648', 229 | '500': '#fb9325', 230 | '600': '#f38107', 231 | '700': '#cd6d08', 232 | '800': '#a75a08', 233 | '900': '#824707', 234 | DEFAULT: '#ffb86c' 235 | }, 236 | buffy: { 237 | '50': '#ffeaf6', 238 | '100': '#ffc4e6', 239 | '200': '#ff9fd6', 240 | '300': '#ff79c6', 241 | '400': '#fd55b6', 242 | '500': '#fb31a5', 243 | '600': '#f80e95', 244 | '700': '#d90880', 245 | '800': '#b3086b', 246 | '900': '#8e0855', 247 | DEFAULT: '#ff79c6' 248 | }, 249 | dracula: { 250 | '50': '#fefeff', 251 | '100': '#e9dafe', 252 | '200': '#d3b6fc', 253 | '300': '#bd93f9', 254 | '400': '#a771f6', 255 | '500': '#924ff2', 256 | '600': '#7d2eed', 257 | '700': '#6916e0', 258 | '800': '#5914bb', 259 | '900': '#491298', 260 | DEFAULT: '#bd93f9' 261 | }, 262 | marcelin: { 263 | '50': '#ffecec', 264 | '100': '#ffc6c6', 265 | '200': '#ffa0a0', 266 | '300': '#ff7b7b', 267 | '400': '#ff5555', 268 | '500': '#fd3131', 269 | '600': '#fb0e0e', 270 | '700': '#dd0606', 271 | '800': '#b70707', 272 | '900': '#910707', 273 | DEFAULT: '#ff5555' 274 | }, 275 | lincoln: { 276 | '50': '#fefff8', 277 | '100': '#fafed3', 278 | '200': '#f6fcaf', 279 | '300': '#f1fa8c', 280 | '400': '#ebf769', 281 | '500': '#e5f347', 282 | '600': '#dfef26', 283 | '700': '#ccdd12', 284 | '800': '#abb811', 285 | '900': '#899410', 286 | DEFAULT: '#f1fa8c' 287 | } 288 | } --------------------------------------------------------------------------------