All Projects β†’ baianat β†’ Color Fns

baianat / Color Fns

Licence: mit
🎨 Modern JavaScript color utilities library

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Color Fns

Values.js
πŸ‡ Get the tints and shades of a color
Stars: ✭ 97 (+49.23%)
Mutual labels:  rgb, hsl, color
colorsys.rs
Lib for modifying colors and converting to other spaces
Stars: ✭ 28 (-56.92%)
Mutual labels:  color, hsl, rgb
Colorhighlight
🎨 Lightweight Color Highlight colorizer for Sublime Text
Stars: ✭ 76 (+16.92%)
Mutual labels:  rgb, hsl, color
color
A library of well-tested helper methods for working with colors.
Stars: ✭ 13 (-80%)
Mutual labels:  color, hsl, rgb
ColorHelper
No description or website provided.
Stars: ✭ 34 (-47.69%)
Mutual labels:  color, hsl, rgb
color
Standard representation of colors, encouraging sharing between packages.
Stars: ✭ 23 (-64.62%)
Mutual labels:  color, hsl, rgb
Chromatism
🌈 A simple set of utility functions for colours.
Stars: ✭ 1,763 (+2612.31%)
Mutual labels:  rgb, hsl, color
React Colorpickr
A themeable colorpicker with HSL and RGB support for React
Stars: ✭ 180 (+176.92%)
Mutual labels:  rgb, hsl, color
khroma
A collection of functions for manipulating CSS colors, inspired by SASS.
Stars: ✭ 28 (-56.92%)
Mutual labels:  color, hsl, rgb
tc-lib-color
PHP library to manipulate various color representations
Stars: ✭ 19 (-70.77%)
Mutual labels:  color, hsl, rgb
Farge
🎈Tell the name of hex color
Stars: ✭ 23 (-64.62%)
Mutual labels:  color, hsl, rgb
ColorTranslator
A JavaScript library, written in TypeScript, to convert among different color models
Stars: ✭ 34 (-47.69%)
Mutual labels:  color, hsl, rgb
Culori
A comprehensive color library for JavaScript.
Stars: ✭ 271 (+316.92%)
Mutual labels:  rgb, hsl, color
colorsys
🎨 Minimalistic color converter for RGB, HSV, HSL, CMYK, HEX and CSS strings
Stars: ✭ 53 (-18.46%)
Mutual labels:  color, rgb
hex-to-css-filter
Easy way to generate colors from HEX to CSS Filters
Stars: ✭ 20 (-69.23%)
Mutual labels:  color, rgb
ColorMinePortable
ColorMinePortable
Stars: ✭ 37 (-43.08%)
Mutual labels:  hsl, rgb
przm
🎨 A simple, yet feature rich color picker and manipulator
Stars: ✭ 19 (-70.77%)
Mutual labels:  color, rgb
colors-convert
🦚 A simple colors library
Stars: ✭ 15 (-76.92%)
Mutual labels:  hsl, rgb
global-color-picker
start the script and click anywhere to get rgb value at the cursor location
Stars: ✭ 31 (-52.31%)
Mutual labels:  color, rgb
ColorPicker
Customizable Color Picker control for WPF
Stars: ✭ 57 (-12.31%)
Mutual labels:  hsl, rgb

Build Status codecov Codacy Badge


Modern and Modular JavaScript color utility library. inspired by date-fns.

Features

  • Written in TypeScript. 😎
  • Lightweight. πŸ’Έ
  • Modular and Tree-shakable.🌳
  • Multi-Color Model Support. 🎨
  • CSS compatible output. πŸ’¨

Installation

# yarn
yarn add color-fns

# npm
npm i color-fns

OR

<script src="https://unpkg.com/color-fns"></script>

Usage

// ES2015 (ES6)
import { toRgb } from 'color-fns';

console.log(toRgb('#fff'));


// CommonJS
const { toRgb } = require('color-fns');
console.log(toRgb('#fff'));

// UMD (Script Tag)
console.log(ColorFns.toRgb('#fff'));

Available Functions

Parsing

  • parseCmyk
  • parseHex
  • parseHsl
  • parseHsv
  • parseRgb

Conversion

  • cmykToRgb
  • hexToRgb
  • hslToRgb
  • hsvToRgb
  • rgbToCmyk
  • rgbToHex
  • rgbToHsl
  • rgbToHsv
  • toCmyk
  • toHex
  • toHsl
  • toHsv
  • toRgb

Operations

  • mix

Format and Display

  • expandHexShorthand
  • formatCmyk
  • formatHex
  • formatHsl
  • formatHsv
  • formatRgb

Validation

  • isValidCmyk
  • isValidHex
  • isValidHsl
  • isValidHsv
  • isValidRgb

Querying

  • whichModel
  • constrastInfo
  • isDark
  • hexFromName
  • hexToName

Calculations

  • relativeLuminance

Contribution

Contributions are welcomed, however make sure you read the contribution guide and the code of conduct before making any pull requests.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].