baianat / Color Fns
Licence: mit
π¨ Modern JavaScript color utilities library
Stars: β 65
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
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
przm
π¨ A simple, yet feature rich color picker and manipulator
Stars: β 19 (-70.77%)
Mutual labels: color, 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
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].