TinyColor is a microframework for inputting colors and outputting colors as different formats. Input is meant to be as permissive as possible. TinyColor is a small, fast library for color manipulation and conversion in JavaScript. It allows many forms of input, while providing color conversions and other color utility functions. It has no dependencies. The string parsing is very permissive. It is meant to make typing a color as input as easy as possible. All commas, percentages, parenthesis are optional, and most input allow either 0-1, 0%-100%, or 0-n (where n is either 100, 255, or 360 depending on the value). HSL and HSV both require either 0%-100% or 0-1 for the S/L/V properties. The H (hue) can have values between 0%-100% or 0-360. RGB input requires either 0-255 or 0%-100%.

Features

  • Manipulate the current color, and return it for chaining
  • Brighten the color a given amount, from 0 to 100
  • Darken the color a given amount, from 0 to 100
  • Desaturate the color a given amount
  • Saturate the color a given amount, from 0 to 100
  • Spin the hue a given amount, from 360 to 360

Project Samples

Project Activity

See All Activity >

Categories

Frameworks, Design

License

MIT License

Follow TinyColor

TinyColor Web Site

You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of TinyColor!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Frameworks, JavaScript Design Software

Registered

2022-01-31