Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@foundit/colorutils

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@foundit/colorutils

A collection of color utility functions.

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Color utils

Color utils is a small library of color manipulating functions.

Most color takes a color object as input. At minimum it looks like this:

{hue: 10, saturation: 20, lightness: 30}

However there is helper functions that translates a string of hex color (#BADA55) or web hsl (hsl(10, 20%, 30%)) into a color object.

const clrObj = hexToObject('#BADA55')

All functions

autoCssVarOnEvent, cssVarToColorObject, webHslToObject, hexToWebRGB, hexToWebHsl, colorObjToWeb, hexToObject, rgbToObject, hslToObject, rotateHue, getComplementary, getTriadic, saturate, desaturate, lighten, darken, isGrayscale, filterDarkColors, filterlightColors, compareLightness, compareSaturation, compareHue, normalizeSaturation, normalizeLightness, normalizeHue,

Commands

commandDescription
npx changesetCreate a changeset
pnpm run buildBuild out esm/mjs files
pnpm run lintCheck that ts ok

Keywords

FAQs

Package last updated on 06 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc