npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

kosmetric-tool

v1.0.8

Published

Tools for kosmetric

Readme

Color Utility Library

간단하고 사용하기 쉬운 TypeScript 색상 유틸리티 라이브러리입니다. RGB, HEX, HSL 색상 변환과 조작 기능을 제공합니다.

설치

npm install kosmetric-tool

사용 방법

색상 생성하기

import { Color } from 'your-package-name';

// HEX 값으로 색상 생성
const redColor = Color.fromHex('#FF0000');

// RGB 값으로 색상 생성
const blueColor = Color.fromRgb(0, 0, 255);

// HSL 값으로 색상 생성
const greenColor = Color.fromHsl(120, 100, 50);

색상 값 가져오기

const color = Color.fromHex('#FF5733');

// 다양한 형식으로 색상 값 얻기
console.log(color.getHex()); // #FF5733
console.log(color.getRgb()); // { r: 255, g: 87, b: 51 }
console.log(color.getHsl()); // { h: 14, s: 100, l: 60 }

색상 조작하기

const color = Color.fromHex('#FF5733');

// 색상 밝게/어둡게 하기
const lighterColor = color.lighten(0.2); // 20% 더 밝게
const darkerColor = color.darken(0.3); // 30% 더 어둡게

// 채도 조절하기
const moreSaturated = color.saturate(0.2); // 채도 20% 증가
const lessSaturated = color.desaturate(0.3); // 채도 30% 감소

API 참조

생성 메서드

  • Color.fromHex(hex: string): HEX 문자열로 색상 생성
  • Color.fromRgb(r: number, g: number, b: number): RGB 값으로 색상 생성
  • Color.fromHsl(h: number, s: number, l: number): HSL 값으로 색상 생성

데이터 변환 메서드

  • Color.hexToRgb(hex: string): HEX 문자열을 RGB 객체로 변환
  • Color.rgbToHex(rgb: RGB): RGB 객체를 HEX 문자열로 변환
  • Color.rgbToHsl(rgb: RGB): RGB 객체를 HSL 객체로 변환
  • Color.hslToRgb(hsl: HSL): HSL 객체를 RGB 객체로 변환
  • Color.hslToHex(hsl: HSL): HSL 객체를 HEX 문자열로 변환
  • Color.hexToHsl(hex: string): HEX 문자열을 HSL 객체로 변환

색상 조작 메서드

  • lighten(amount: number): 색상을 밝게 만듦 (0~1 사이의 값)
  • darken(amount: number): 색상을 어둡게 만듦 (0~1 사이의 값)
  • saturate(amount: number): 색상의 채도를 증가시킴 (0~1 사이의 값)
  • desaturate(amount: number): 색상의 채도를 감소시킴 (0~1 사이의 값)

라이센스

MIT

kosmetric-tool