All Projects → kevinrodriguez-io → pigment

kevinrodriguez-io / pigment

Licence: MIT License
A powerful library that provides color-conversions, palette/scheme generation, color manipulation and many more features intended to provide a great UX.

Programming Languages

typescript
32286 projects
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to pigment

colorsys.rs
Lib for modifying colors and converting to other spaces
Stars: ✭ 28 (+21.74%)
Mutual labels:  hsl, rgb
ColorPicker
Customizable Color Picker control for WPF
Stars: ✭ 57 (+147.83%)
Mutual labels:  hsl, rgb
tc-lib-color
PHP library to manipulate various color representations
Stars: ✭ 19 (-17.39%)
Mutual labels:  hsl, rgb
React Colorpickr
A themeable colorpicker with HSL and RGB support for React
Stars: ✭ 180 (+682.61%)
Mutual labels:  hsl, rgb
Farge
🎈Tell the name of hex color
Stars: ✭ 23 (+0%)
Mutual labels:  hsl, rgb
Alfred-Colors-workflow
hex <=> rgb <=> hsl
Stars: ✭ 28 (+21.74%)
Mutual labels:  hsl, rgb
vscode-color
Helper with GUI to generate color codes such as CSS color notations.
Stars: ✭ 88 (+282.61%)
Mutual labels:  hsl, rgb
Mpcolortools
A collection of tools for handling colors on iOS SDK
Stars: ✭ 128 (+456.52%)
Mutual labels:  hsl, rgb
color
Standard representation of colors, encouraging sharing between packages.
Stars: ✭ 23 (+0%)
Mutual labels:  hsl, rgb
ColorTranslator
A JavaScript library, written in TypeScript, to convert among different color models
Stars: ✭ 34 (+47.83%)
Mutual labels:  hsl, rgb
Pictool
A front-end image processing gadget
Stars: ✭ 168 (+630.43%)
Mutual labels:  hsl, rgb
color
A library of well-tested helper methods for working with colors.
Stars: ✭ 13 (-43.48%)
Mutual labels:  hsl, rgb
Chromatism
🌈 A simple set of utility functions for colours.
Stars: ✭ 1,763 (+7565.22%)
Mutual labels:  hsl, rgb
andColorPicker
Color picker library for Android
Stars: ✭ 233 (+913.04%)
Mutual labels:  hsl, rgb
Gradstop
JavaScript micro library to generate gradient color stops 🏳️‍🌈
Stars: ✭ 144 (+526.09%)
Mutual labels:  hsl, rgb
khroma
A collection of functions for manipulating CSS colors, inspired by SASS.
Stars: ✭ 28 (+21.74%)
Mutual labels:  hsl, rgb
Colorhighlight
🎨 Lightweight Color Highlight colorizer for Sublime Text
Stars: ✭ 76 (+230.43%)
Mutual labels:  hsl, rgb
Values.js
🍇 Get the tints and shades of a color
Stars: ✭ 97 (+321.74%)
Mutual labels:  hsl, rgb
ColorHelper
No description or website provided.
Stars: ✭ 34 (+47.83%)
Mutual labels:  hsl, rgb
ColorMinePortable
ColorMinePortable
Stars: ✭ 37 (+60.87%)
Mutual labels:  hsl, rgb

Logo

Pigment 🌈 - A Colorful JS Framework

Watch on GitHub Star on GitHub Tweet!

@kevinrodriguez-io/pigment PRs Welcome All Contributors lerna

Live tool/example

Video

Video example

Introduction

Pigment is a lightweight, yet powerful, color framework for the web, react-native (WIP) and any other JS-Based project. It is built on the idea that software applications should function effortlessly while simultaneously maintaining their beautiful interfaces.

With Pigment, you can easily stop tinkering with RGB values, wasting hours figuring out the right color combinations to use in your app, and worrying about whether your text will be readable on the various background colors of your app.

Does this sound familiar? That's because Pigment is heavily inspired by Vicc Alexander's Chameleon Framework, which provides this functionality for native iOS (OBJC & Swift 3).

Flat Colors

Features

Features

  • Color conversions between:
    • HEX
    • RGB
    • HSL
    • LAB
    • XYZ
  • 24 Hand-Picked Flat Colors in both shades (Light and Dark)
  • Color shades generation
  • Find most similar hand-picked Flat color from another color
  • Get contrasting color text (Black / White) from another color
  • Generate Color Schemes:
    • Analogous
    • Complementary
    • Triadic
  • Compatible with Chameleon Framework's Sketch, PhotoShop and Storyboard plugins.

Examples

Installing

npm i @kevinrodriguez-io/pigment-core --save

or

yarn add @kevinrodriguez-io/pigment-core

Usage

  • Wrap your color * Supported formats: HEX, RGB, HSL
import { Color, Colors } from '@kevinrodriguez-io/pigment-core'

const hex = Colors.flatRed.light
const color = new Color(hex)
  • Get complementary color
color.complementaryColor
  • Get most similar Hand-Picked Flat color
color.nearestFlatColor
  • Get all color shades with a 25% separation
color.all(25)
color.nearestFlatColor.all(25) // Flat-color shades
  • Get color tints/shades (Array or single item) with a 25% separation
color.tints(25)
color.shades(25)
color.tint(25) // Just one color
color.shade(25) // Just one color
  • Get analogous color scheme (Regular & Flat)
color.analogousColorScheme
color.analogousFlatColorScheme
  • Get complementary color scheme
color.complementaryColorScheme
color.complementaryFlatColorScheme
  • Get triadic color scheme
color.triadicColorScheme
color.triadicFlatColorScheme
  • Get contrasting text color (Black/White)
color.contrastingTextColor
color.contrastingFlatTextColor // Flat version

Coming soon

  • Global-theming examples with styled-components (CSS in JS)
  • Global-theming examples with emotion/native
  • Get color scheme from image (Web)
  • Get color scheme from image (React-Native)
  • Machine-Learning JS models for color scheme generation
  • CSS Global Theme Generation
  • CSS Houdini Paint Worklets to support conversions and derived colors

Contributors

Thanks goes to these wonderful people (emoji key):


Kevin Rodríguez

📖 💻 🤔 ⚠️

Vicc Alexander

🤔

Kevin Wolf

🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

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].