@wedgekit/color
TypeScript icon, indicating that this package has built-in type declarations

4.6.0 • Public • Published

Color

Purpose

The color package allows users to generate colors approved by the design system.

The default export of @wedgekit/color is an object in which each key is a ColorTag and each value is a color represented in hex.

Usage

import styled from 'styled-components';

import color from '@wedgekit/color';

const ColorSwatch = styled.div`
  height: 90px;
  width: 90px;
  background: ${color.G700};
`;

const Example = () => <ColorSwatch />;

render(<Example />);

ColorTag

A ColorTag is a string that combines a color family abbreviation (i.e. Blue -> B) and three digit number indicating a color in that family. As a rule, higher numbers are darker. For example:

color.N700 is black.

color.N050 is white.

Further reading on avaliable colors avaliable here

Usage

import { ColorTag } from '@wedgekit/color';

Other Exports

contextualize

getContrastColors

hexToRGBA

Readme

Keywords

none

Package Sidebar

Install

npm i @wedgekit/color

Weekly Downloads

116

Version

4.6.0

License

MIT

Unpacked Size

12.4 kB

Total Files

10

Last publish

Collaborators

  • tprettyman
  • rnimrod
  • jquerijero
  • brent-heavican
  • msuiter
  • rerskine
  • timmy2654
  • jfiller
  • mada1113
  • hbiede.dmsi
  • kolson
  • dreadman3716