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

2.0.13 • Public • Published

Nord Color Utilities

This package includes Nord Design System color utilities, including:

  • getColorPalette which generates color palettes programmatically for use with Nord Themes.
  • getContrastRatio which calculates the contrast ratio between two colors.
  • getTextColor which calculates the correct text color for a chosen background.
  • hexToRgb which converts a HEX color to a RGB color.
  • rgbToHex which converts a RGB color to a HEX color.

Commands

The following are the most commonly used commands during development:

  • npm start - Compile color library and start local development server on port 8000.
  • npm run build - Builds the project.

License

See license in LICENSE.md

Copyright

Copyright © 2023 Nordhealth Ltd.

Readme

Keywords

none

Package Sidebar

Install

npm i @nordhealth/color

Weekly Downloads

234

Version

2.0.13

License

SEE LICENSE IN LICENSE.md

Unpacked Size

228 kB

Total Files

24

Last publish

Collaborators

  • arielles
  • elwinvaneede
  • nordhealthadmin