Download the PHP package fyre/color without Composer

On this page you can find all versions of the php package fyre/color. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package color

FyreColor

FyreColor is a free, open-source immutable color manipulation library for PHP.

It is a modern library, and features full support for RGB, HSL, HSV, CMY and CMYK color-spaces.

Table Of Contents

Installation

Using Composer

In PHP:

Basic Usage

From RGB

From Brightness

Color Creation

From String

Create a new Color from a HTML color string.

From CMY

Create a new Color from CMY values.

From CMYK

Create a new Color from CMYK values.

From HSL

Create a new Color from HSL values.

From HSV

Create a new Color from HSV values.

Color Formatting

To String

Get a HTML string representation of the color.

The $colorString returned will be a string containing either a HTML color name (if one exists), a hexadecimal string (if alpha is 1) or an RGBA string.

To Hex String

Get a hexadecimal string representation of the color.

To RGB String

Get a RGB/RGBA string representation of the color.

To HSL String

Get a HSL/HSLA string representation of the color.

Label

Get the closest color name for the color.

Color Attributes

Get Alpha

Get the alpha value of the color (between 0 and 1).

Get Brightness

Get the brightness value of the color (between 0 and 100).

Get Hue

Get the hue value of the color (between 0 and 360).

Get Saturation

Get the saturation value of the color (between 0 and 100).

Luma

Get the relative luminance value of the color (between 0 and 1).

Set Alpha

Set the alpha value of the color.

Set Brightness

Set the brightness value of the color.

Set Hue

Set the hue value of the color.

Set Saturation

Set the saturation value of the color.

Color Manipulation

Darken

Darken the color by a specified amount.

Invert

Invert the color.

Lighten

Lighten the color by a specified amount.

Shade

Shade the color by a specified amount.

Tint

Tint the color by a specified amount.

Tone

Tone the color by a specified amount.

Color Schemes

Complementary

Create a complementary color variation.

Split

Create an array with 2 split color variations.

Analogous

Create an array with 2 analogous color variations.

Triadic

Create an array with 2 triadic color variations.

Tetradic

Create an array with 3 tetradic color variations.

Color Palettes

Create a palette of colors from a Color object you have created using the following methods.

Shades

Create an array with a specified number of shade variations.

Tints

Create an array with a specified number of tint variations.

Tones

Create an array with a specified number of tone variations.

Palette

Create a palette object with a specified number of shades, tints and tone variations.

Static Methods

Contrast

Calculate the contrast between two colors (between 1 and 21).

Distance

Calculate the distance between two colors.

Find Contrast

Find an optimally contrasting color for another color.

If $color2 value is null, $color1 will be used instead.

This method will tint/shade $color2 until it meets a minimum contrast threshold with $color1, then the new color will be returned. If no valid contrast value can be found, this method will return null instead.

Mix

Create a new Color by mixing two colors together by a specified amount.

Multiply

Create a new Color by multiplying two colors together by a specified amount.


All versions of color with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fyre/color contains the following files

Loading the files please wait ....