Skip to content

Commit

Permalink
added support for colors 50 - 900
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgraffis committed Nov 6, 2021
1 parent 3c49ba6 commit 8d83530
Show file tree
Hide file tree
Showing 3 changed files with 302 additions and 47 deletions.
312 changes: 288 additions & 24 deletions colors.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,288 @@
module.exports = {
darker: '#282a36',
dark: '#44475a',
light: '#f8f8f2',
blue: '#6272a4',
cyan: '#8be9fd',
green: '#50fa7b',
orange: '#ffb86c',
pink: '#ff79c6',
purple: '#bd93f9',
red: '#ff5555',
yellow: '#f1fa8c',
nosferatu: '#282a36',
aro: '#44475a',
cullen: '#f8f8f2',
vonCount: '#6272a4',
vanHelsing: '#8be9fd',
blade: '#50fa7b',
morbius: '#ffb86c',
buffy: '#ff79c6',
dracula: '#bd93f9',
marcelin: '#ff5555',
lincoln: '#f1fa8c',
}
module.exports = {
darker: {
'50': '#cdd0e4',
'100': '#b5bad6',
'200': '#9ea4c8',
'300': '#888fb8',
'400': '#727aa8',
'500': '#5f6795',
'600': '#53597c',
'700': '#454a64',
'800': '#373a4d',
'900': '#282a36',
DEFAULT: '#282a36'
},
dark: {
'50': '#f7f7fb',
'100': '#dfe1ed',
'200': '#c7cadf',
'300': '#b1b5d0',
'400': '#9ba0c0',
'500': '#858bb0',
'600': '#71779f',
'700': '#606689',
'800': '#525771',
'900': '#44475a',
DEFAULT: '#44475a'
},
light: {
'50': '#f8f8f2',
'100': '#eaeada',
'200': '#dcdcc3',
'300': '#cdcdac',
'400': '#bdbd96',
'500': '#adad81',
'600': '#9c9c6c',
'700': '#85855d',
'800': '#6d6d4f',
'900': '#565641',
DEFAULT: '#f8f8f2'
},
blue: {
'50': '#f0f2f8',
'100': '#d7dcec',
'200': '#bec6df',
'300': '#a6b0d1',
'400': '#8f9bc3',
'500': '#7886b4',
'600': '#6272a4',
'700': '#54628c',
'800': '#485273',
'900': '#3b425a',
DEFAULT: '#6272a4'
},
cyan: {
'50': '#fafeff',
'100': '#d4f8ff',
'200': '#aff0fe',
'300': '#8be9fd',
'400': '#67e1fb',
'500': '#44d9f8',
'600': '#22d0f5',
'700': '#0dbfe5',
'800': '#0ca0bf',
'900': '#0c819a',
DEFAULT: '#8be9fd'
},
green: {
'50': '#e2ffe9',
'100': '#bcffcd',
'200': '#97feb1',
'300': '#73fc96',
'400': '#50fa7b',
'500': '#2df760',
'600': '#0cf346',
'700': '#0ccd3d',
'800': '#0ba833',
'900': '#0a8329',
DEFAULT: '#50fa7b'
},
orange: {
'50': '#ffefdd',
'100': '#ffdcb7',
'200': '#ffca92',
'300': '#ffb86c',
'400': '#fda648',
'500': '#fb9325',
'600': '#f38107',
'700': '#cd6d08',
'800': '#a75a08',
'900': '#824707',
DEFAULT: '#ffb86c'
},
pink: {
'50': '#ffeaf6',
'100': '#ffc4e6',
'200': '#ff9fd6',
'300': '#ff79c6',
'400': '#fd55b6',
'500': '#fb31a5',
'600': '#f80e95',
'700': '#d90880',
'800': '#b3086b',
'900': '#8e0855',
DEFAULT: '#ff79c6'
},
purple: {
'50': '#fefeff',
'100': '#e9dafe',
'200': '#d3b6fc',
'300': '#bd93f9',
'400': '#a771f6',
'500': '#924ff2',
'600': '#7d2eed',
'700': '#6916e0',
'800': '#5914bb',
'900': '#491298',
DEFAULT: '#bd93f9'
},
red: {
'50': '#ffecec',
'100': '#ffc6c6',
'200': '#ffa0a0',
'300': '#ff7b7b',
'400': '#ff5555',
'500': '#fd3131',
'600': '#fb0e0e',
'700': '#dd0606',
'800': '#b70707',
'900': '#910707',
DEFAULT: '#ff5555'
},
yellow: {
'50': '#fefff8',
'100': '#fafed3',
'200': '#f6fcaf',
'300': '#f1fa8c',
'400': '#ebf769',
'500': '#e5f347',
'600': '#dfef26',
'700': '#ccdd12',
'800': '#abb811',
'900': '#899410',
DEFAULT: '#f1fa8c'
},
nosferatu: {
'50': '#cdd0e4',
'100': '#b5bad6',
'200': '#9ea4c8',
'300': '#888fb8',
'400': '#727aa8',
'500': '#5f6795',
'600': '#53597c',
'700': '#454a64',
'800': '#373a4d',
'900': '#282a36',
DEFAULT: '#282a36'
},
aro: {
'50': '#f7f7fb',
'100': '#dfe1ed',
'200': '#c7cadf',
'300': '#b1b5d0',
'400': '#9ba0c0',
'500': '#858bb0',
'600': '#71779f',
'700': '#606689',
'800': '#525771',
'900': '#44475a',
DEFAULT: '#44475a'
},
cullen: {
'50': '#f8f8f2',
'100': '#eaeada',
'200': '#dcdcc3',
'300': '#cdcdac',
'400': '#bdbd96',
'500': '#adad81',
'600': '#9c9c6c',
'700': '#85855d',
'800': '#6d6d4f',
'900': '#565641',
DEFAULT: '#f8f8f2'
},
vonCount: {
'50': '#f0f2f8',
'100': '#d7dcec',
'200': '#bec6df',
'300': '#a6b0d1',
'400': '#8f9bc3',
'500': '#7886b4',
'600': '#6272a4',
'700': '#54628c',
'800': '#485273',
'900': '#3b425a',
DEFAULT: '#6272a4'
},
vanHelsing: {
'50': '#fafeff',
'100': '#d4f8ff',
'200': '#aff0fe',
'300': '#8be9fd',
'400': '#67e1fb',
'500': '#44d9f8',
'600': '#22d0f5',
'700': '#0dbfe5',
'800': '#0ca0bf',
'900': '#0c819a',
DEFAULT: '#8be9fd'
},
blade: {
'50': '#e2ffe9',
'100': '#bcffcd',
'200': '#97feb1',
'300': '#73fc96',
'400': '#50fa7b',
'500': '#2df760',
'600': '#0cf346',
'700': '#0ccd3d',
'800': '#0ba833',
'900': '#0a8329',
DEFAULT: '#50fa7b'
},
morbius: {
'50': '#ffefdd',
'100': '#ffdcb7',
'200': '#ffca92',
'300': '#ffb86c',
'400': '#fda648',
'500': '#fb9325',
'600': '#f38107',
'700': '#cd6d08',
'800': '#a75a08',
'900': '#824707',
DEFAULT: '#ffb86c'
},
buffy: {
'50': '#ffeaf6',
'100': '#ffc4e6',
'200': '#ff9fd6',
'300': '#ff79c6',
'400': '#fd55b6',
'500': '#fb31a5',
'600': '#f80e95',
'700': '#d90880',
'800': '#b3086b',
'900': '#8e0855',
DEFAULT: '#ff79c6'
},
dracula: {
'50': '#fefeff',
'100': '#e9dafe',
'200': '#d3b6fc',
'300': '#bd93f9',
'400': '#a771f6',
'500': '#924ff2',
'600': '#7d2eed',
'700': '#6916e0',
'800': '#5914bb',
'900': '#491298',
DEFAULT: '#bd93f9'
},
marcelin: {
'50': '#ffecec',
'100': '#ffc6c6',
'200': '#ffa0a0',
'300': '#ff7b7b',
'400': '#ff5555',
'500': '#fd3131',
'600': '#fb0e0e',
'700': '#dd0606',
'800': '#b70707',
'900': '#910707',
DEFAULT: '#ff5555'
},
lincoln: {
'50': '#fefff8',
'100': '#fafed3',
'200': '#f6fcaf',
'300': '#f1fa8c',
'400': '#ebf769',
'500': '#e5f347',
'600': '#dfef26',
'700': '#ccdd12',
'800': '#abb811',
'900': '#899410',
DEFAULT: '#f1fa8c'
}
}
35 changes: 13 additions & 22 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const plugin = require('tailwindcss/plugin')
const baseColors = require('./colors')

module.exports = function (prefix, hard = false) {
let module = plugin(function({ theme }) {
Expand All @@ -7,28 +8,18 @@ module.exports = function (prefix, hard = false) {
theme: {
extend: {
colors: theme => ({
[prefix ? prefix + '-darker' : 'darker']: '#282a36',
[prefix ? prefix + '-dark' : 'dark']: '#44475a',
[prefix ? prefix + '-light' : 'light']: '#f8f8f2',
[prefix ? prefix + '-blue' : 'blue']: '#6272a4',
[prefix ? prefix + '-cyan' : 'cyan']: '#8be9fd',
[prefix ? prefix + '-green' : 'green']: '#50fa7b',
[prefix ? prefix + '-orange' : 'orange']: '#ffb86c',
[prefix ? prefix + '-pink' : 'pink']: '#ff79c6',
[prefix ? prefix + '-purple' : 'purple']: '#bd93f9',
[prefix ? prefix + '-red' : 'red']: '#ff5555',
[prefix ? prefix + '-yellow' : 'yellow']: '#f1fa8c',
[prefix && hard ? prefix + '-nosferatu' : 'nosferatu']: '#282a36',
[prefix && hard ? prefix + '-aro' : 'aro']: '#44475a',
[prefix && hard ? prefix + '-cullen' : 'cullen']: '#f8f8f2',
[prefix && hard ? prefix + '-vonCount' : 'vonCount']: '#6272a4',
[prefix && hard ? prefix + '-vanHelsing' : 'vanHelsing']: '#8be9fd',
[prefix && hard ? prefix + '-blade' : 'blade']: '#50fa7b',
[prefix && hard ? prefix + '-morbius' : 'morbius']: '#ffb86c',
[prefix && hard ? prefix + '-buffy' : 'buffy']: '#ff79c6',
[prefix && hard ? prefix + '-dracula' : 'dracula']: '#bd93f9',
[prefix && hard ? prefix + '-marcelin' : 'marcelin']: '#ff5555',
[prefix && hard ? prefix + '-lincoln' : 'lincoln']: '#f1fa8c',
...(() => {
const returnColors = {}
Object.keys(baseColors).forEach((key, index) => {
if (index < 10) returnColors[
prefix ? prefix + `-${key}` : key
] = baseColors[key]
else returnColors[
prefix && hard ? prefix + `-${key}` : key
] = baseColors[key]
})
return returnColors
})()
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tailwind-dracula",
"version": "1.0.5",
"version": "1.0.6",
"description": "A super tiny tailwind plugin that enables the use of the Dracula colour palette.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 8d83530

Please sign in to comment.