Add color presets

pull/3/head
Amio 2018-06-23 01:42:12 +08:00
rodzic e3a92a6c0d
commit cdf127c7f1
2 zmienionych plików z 15 dodań i 1 usunięć

Wyświetl plik

@ -0,0 +1,11 @@
module.exports = {
green: '3C1',
blue: '08C',
red: 'D52',
yellow: 'DB1',
orange: 'F73',
purple: 'A3E',
pink: 'E48',
grey: '999',
black: '000'
}

Wyświetl plik

@ -1,6 +1,9 @@
const calcWidth = require('./calc-text-width.js').Arial12
const colorPresets = require('./color-presets.js')
module.exports = function ({subject, status, color}) {
color = colorPresets[color] || color || colorPresets['green']
module.exports = function ({subject, status, color = '3C1'}) {
// const charWidth = 7.3
const calcFactor = 0.4