How to use the open-color.blue function in open-color

To help you get started, we’ve selected a few open-color examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BoostIO / BoostNote.next / src / lib / styled / themes / default.ts View on Github external
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,
github bmcmahen / sancho / src / Theme / colors.ts View on Github external
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;