Giter Site home page Giter Site logo

projectcleverweb / php-color Goto Github PK

View Code? Open in Web Editor NEW
23.0 5.0 8.0 218 KB

A PHP 7 library for working with RGB, HSL, and Hexadecimal colors. Create schemes, modify specific color properties, export CMYK, and make color suggestions quickly and easily with this stand-alone library.

Home Page: http://jsfiddle.net/Ls1hcsaz/embedded/result/

License: Other

PHP 100.00%
php-color hsl hexadecimal-color scheme rgb export-cmyk light php php7 php-library

php-color's Introduction

PHP Color   License Travis Build Status Scrutinizer Code Quality Scrutinizer Code Coverage Code Climate Code GPA

This is a PHP 7 library for working with RGB, HSL, and Hexadecimal colors. Create schemes, modify specific color properties, export CMYK, and make color suggestions quickly and easily with this stand-alone library.

Demo: jsfiddle.net/t3LL4q14

Download:

GitHub release

Copyright © 2016 Nicholas Jordon — All Rights Reserved

Features

  • Convert any color between the RGB, HSL, HSB, Hexadecimal, and CMYK color spectrums.
  • Dynamically generate 10 different color scheme algorithims for any color. (That's over 165,000,000 possible schemes)
  • Check whether a color appears visually dark or light. (uses YIQ weights for better accuraccy)
  • Easily modify a color's hue, saturation, light, red, green, blue, and alpha (transparcency) values.
  • Generate CSS values on the fly
  • Find the contrast between 2 colors.
  • Dynamically generate random colors, including for specific color ranges.
  • All errors are recoverable, and errors can be triggered as exceptions (default), using trigger_error(), or can be turned off for all instances.

Installation & Usage

See the Official Wiki on Github for all documentation.

Contributing

Contributing via Suggestions:
The best way to submit a suggestion is to open an issue on Github and prefix the title with [Suggestion]. Alternatively, you can email your suggestions to projectcleverweb(at)gmail(dot)com.

Contributing via Reporting Problems:
All problems must be reported via Github's issue tracker.

Contributing via Code:

  1. Fork the repo on Github: github.com/ProjectCleverWeb/PHP-Color
  2. Make your changes.
  3. Send a pull request to have your changes reviewed.

License

The PHP-Color documentation & source code (hereafter referred to as "Library") by Nicholas Summers (hereafter referred to as "Author") is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License with the below "Additional Terms" superseding it. To view a copy of the Creative Commons license, visit creativecommons.org/licenses/by-nc-nd/4.0. From now on "License" refers to this combination of licensing.

Additional Terms:

  1. Any person or non-profit entity or may use this Library for personal or professional use as long as the Library as well as any of its parts are not sold in any fashion, and users are not forced to pay to use it in any way.
  2. Anyone may use this Library for purely internal use as long as the Library as well as any of its parts are available without payment and are not publicly accessible.
  3. Anyone seeking to sell this Library or use this Library in a commercial environment MUST first obtain a OEM license from the Author.
  4. Anyone in direct violation of this License is liable for a minimum of $50,000 in damages, plus an additional $10 per user, and agrees to refund any charge or fees collected as a result of violating this License.
  5. By downloading or using this Library you agree to all the License terms.

php-color's People

Contributors

projectcleverweb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

php-color's Issues

Cannot install via composer

I have tried to install this via composer to play with it but cannot. I tried both...

projectcleverweb/color and projectcleverweb/php-color

Neither seem to work...

using schemes

Hi @ProjectCleverWeb

thanks for that library. It appears to be great. Is it possible to get an example of using scheme / yiq_scheme / color range ? Wiki pages are empty.

Basically, I'd like to set a color ramp as I can easily do it with chroma.js (see below) and get back values in an array, using predefined values.

var viz_color = chroma.scale("RdYlGn").colors('.count($a).');

Thanks for your reply

Need conversion docs

Hey library looks good, currently i'm in need of colour conversion documentation.

I'm looking at your tests for the time being 😁

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.