Code Monkey home page Code Monkey logo

colorful's Introduction

Colorful

Some util functions for color.

pnpm i @0x-jerry/colorful
import { getContrastRatio, parseHex } from '@0x-jerry/colorful'
const c1 = parseHex('#000')
const c2 = parseHex('#ff00ff')
const ratio = getContrastRatio(c1, c2) // => 6.696

Parser

Support:

  • hex format, eg. #000, #010101
  • rgb format, eg. rgb(24, 22, 66), rgba(2, 24, 244, 0.4), rgba(2, 24, 244 / 0.4)
  • hsl format, eg. hsl(66, 40%, 30%), hsl(66 30% 40% / 0.5)

Convertor

Support:

  • rgbToHsl
  • hslToRgb
  • hslToHsv
  • hsvToHwb

Contrast

Support:

  • getContrastRatio

colorful's People

Contributors

0x-jerry avatar renovate[bot] avatar

Stargazers

 avatar

Watchers

 avatar

colorful's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm @vitest/coverage-c8 Unavailable

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update codecov/codecov-action action to v4
  • chore(deps): update dependency @0x-jerry/x-release to v2
  • chore(deps): update dependency happy-dom to v14
  • chore(deps): update dependency tsup to v8
  • chore(deps): update dependency tsx to v4
  • chore(deps): update dependency vite to v5
  • chore(deps): update dependency vitest to v2
  • chore(deps): update peaceiris/actions-gh-pages action to v4
  • chore(deps): update softprops/action-gh-release action to v2
  • fix(deps): update dependency @0x-jerry/utils to v3
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/gh-pages.yml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
  • peaceiris/actions-gh-pages v3.8.0
.github/workflows/release.yml
  • actions/checkout v3
  • actions/setup-node v3
  • softprops/action-gh-release v1
.github/workflows/test.yml
  • actions/checkout v3
  • actions/setup-node v3
  • codecov/codecov-action v3
npm
docs/package.json
  • mmcq.js ^1.2.1
  • normalize.css ^8.0.1
  • vue ^3.2.37
  • @vitejs/plugin-vue ^3.1.0
  • less ^4.1.3
  • typescript ^4.6.4
  • unocss ^0.45.30
  • vite ^3.1.0
package.json
  • @0x-jerry/utils ^1.14.0
  • @0x-jerry/x-release ^0.3.6
  • @types/node ^18.14.6
  • @vitest/coverage-c8 ^0.29.2
  • happy-dom ^8.9.0
  • tsup ^6.6.3
  • tsx ^3.12.3
  • vitest ^0.29.2
  • node >= 14

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.