Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import colors from 'open-color'
import { Theme } from './interface'
const textColor = colors.gray[0]
const backgroundColor = colors.gray[9]
const activeColor = colors.blue[5]
const activeTextColor = colors.gray[0]
const borderColor = colors.gray[7]
const fontSize = 12
export const defaultTheme: Theme = {
app: {
textColor,
backgroundColor,
fontSize
},
sideNav: {
linkActiveBackgroundColor: activeColor,
borderColor
},
contextMenu: {
backgroundColor,
export function alpha(c: string, amount: number) {
return color(c)
.alpha(amount)
.hsl()
.string();
}
/**
* normalize open-color to remove some colours,
* such as 'grape'. This should be compatible with a tool
* like palx.
*/
const defaultScales = {
gray: open.gray,
blue: open.blue,
green: open.green,
red: open.red,
orange: open.orange,
yellow: open.yellow,
teal: open.teal,
cyan: open.cyan,
lime: open.lime,
pink: open.pink,
violet: open.violet,
indigo: open.indigo
};
export type ScalesType = typeof defaultScales;
type PaletteItem = {
lightest: string;