JSPM

@swiftcarrot/color-fns

3.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 24996
  • Score
    100M100P100Q159204F
  • License MIT

color functions for node and browser

Package Exports

  • @swiftcarrot/color-fns

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@swiftcarrot/color-fns) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@swiftcarrot/color-fns

npm npm Build Status codecov styled with prettier

Color functions for node and browser

Installation

npm install @swiftcarrot/color-fns --save
yarn add @swiftcarrot/color-fns

Usage

// commonjs
const { hex2rgb } = require('@swiftcarrot/color-fns');

// es module
import { hex2rgb, cssColor } from '@swiftcarrot/color-fns';
import * as fns from '@swiftcarrot/color-fns';

Available functions

  • cssColor: parse a valid css color value to rgba format
  • hex2hsl
  • hex2hsv
  • hex2rgb
  • hsl2hsv
  • hsl2rgb
  • hsv2hex
  • hsv2hsl
  • hsv2rgb
  • rgb2hex
  • rgb2hsv
  • rgba
  • rgba2hex
  • rgba2rgb

check test for more examples

License

MIT