New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

khroma

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

khroma

A collection of functions for manipulating CSS colors, inspired by SASS.

2.1.0
latest
Source
npm
Version published
Weekly downloads
829K
-18.99%
Maintainers
1
Weekly downloads
 
Created

What is khroma?

Khroma is an npm package designed for color manipulation and generation. It provides a variety of utilities for working with colors, including generating color palettes, converting between color formats, and manipulating color properties.

What are khroma's main functionalities?

Color Generation

Generates a monochromatic color palette based on a given color. The `palette` function can generate different types of color palettes such as monochromatic, analogous, complementary, etc.

const khroma = require('khroma');
const palette = khroma.palette('monochromatic', '#3498db');
console.log(palette);

Color Conversion

Converts a hex color code to its RGB representation. The `hexToRgb` function is useful for converting color formats.

const khroma = require('khroma');
const rgb = khroma.hexToRgb('#3498db');
console.log(rgb);

Color Manipulation

Lightens a given color by a specified amount. The `lighten` function is useful for adjusting the brightness of a color.

const khroma = require('khroma');
const lighterColor = khroma.lighten('#3498db', 0.2);
console.log(lighterColor);

Other packages similar to khroma

Keywords

sass

FAQs

Package last updated on 12 Oct 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