GithubHelp home page GithubHelp logo

facelessuser / coloraide Goto Github PK

View Code? Open in Web Editor NEW
160.0 4.0 11.0 121.98 MB

A library to aid in using colors

Home Page: https://facelessuser.github.io/coloraide

License: MIT License

Python 99.28% JavaScript 0.72%
colors css python color-contrast color-difference color-filters color-harmonies color-spaces color-vision-deficiency colour color-conversion color-interpolation color-temperature color-manipulation

coloraide's Introduction

Donate via PayPal Build Coverage Status PyPI Version PyPI Downloads PyPI - Python Version License

ColorAide

Overview

ColorAide is a pure Python, object oriented approach to colors.

>>> from coloraide import Color
>>> c = Color("red")
>>> c.to_string()
'rgb(255 0 0)'
>>> c.convert('hsl').to_string()
'hsl(0 100% 50%)'
>>> c.set("lch.chroma", 30).to_string()
'rgb(173.81 114.29 97.218)'
>>> Color("blue").mix("yellow", space="lch").to_string()
'rgb(255 65.751 107.47)'

ColorAide particularly has a focus on the following:

  • Accurate colors.

  • Proper round tripping (where reasonable).

  • Be generally easy to pick up for the average user.

  • Support modern CSS color spaces and syntax.

  • Make accessible many new and old non-CSS color spaces.

  • Provide a number of useful utilities such as interpolation, color distancing, blending, gamut mapping, filters, correlated color temperature, color vision deficiency simulation, etc.

  • Provide a plugin API to extend supported color spaces and approaches to various utilities.

  • Allow users to configure defaults to their liking.

With ColorAide, you can specify a color, convert it to other color spaces, mix it with other colors, output it in different CSS formats, and much more!

Documentation

https://facelessuser.github.io/coloraide

License

MIT

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.