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 all CSS color-spaces.

Table Of Contents

Installation

Using Composer

In PHP:

Basic Usage

Color Creation

Create From A98 RGB

Create From Display P3

Create From Display P3 Linear

Create From HSL

Create From HWB

Create From Lab

Create From Lch

Create From OkLab

Create From OkLch

Create From ProPhoto Rgb

Create From Rec 2020

Create From Rgb

Create From Srgb

Create From Srgb Linear

Create From Xyz D50

Create From Xyz D65

Colors

Contrast

Calculate the contrast between this and another Color.

Get Alpha

Get the alpha value.

Label

Find the closest HTML color name for this color (in current color space).

Luma

Calculate the relative luminance value.

Space

Get the current color space.

To

Convert the Color to a named color space.

To A98 RGB

Convert the Color to A98Rgb.

To Array

Get the color components as an array.

To Display P3

Convert the Color to DisplayP3.

To Display P3 Linear

Convert the Color to DisplayP3Linear.

To Hex

Convert the Color to Hex.

To HSL

Convert the Color to Hsl.

To HWB

Convert the Color to Hwb.

To Lab

Convert the Color to Lab.

To Lch

Convert the Color to Lch.

To OkLab

Convert the Color to OkLab.

To OkLch

Convert the Color to OkLch.

To ProPhoto Rgb

Convert the Color to ProPhotoRgb.

To Rec 2020

Convert the Color to Rec2020.

To Rgb

Convert the Color to Rgb.

To Srgb

Convert the Color to Srgb.

To Srgb Linear

Convert the Color to SrgbLinear.

To String

Get the CSS color string.

To Xyz D50

Convert the Color to XyzD50.

To Xyz D65

Convert the Color to XyzD65.

With Alpha

Clone the Color with a new alpha value.

A98 RGB

Get Blue

Get the blue value.

Get Green

Get the green value.

Get Red

Get the red value.

With Blue

Clone the Color with a new blue value.

With Green

Clone the Color with a new green value.

With Red

Clone the Color with a new red value.

Display P3

Get Blue

Get the blue value.

Get Green

Get the green value.

Get Red

Get the red value.

With Blue

Clone the Color with a new blue value.

With Green

Clone the Color with a new green value.

With Red

Clone the Color with a new red value.

Display P3 Linear

Get Blue

Get the blue value.

Get Green

Get the green value.

Get Red

Get the red value.

With Blue

Clone the Color with a new blue value.

With Green

Clone the Color with a new green value.

With Red

Clone the Color with a new red value.

Hex

Get Blue

Get the blue value.

Get Green

Get the green value.

Get Red

Get the red value.

To String

Get the CSS color string.

With Blue

Clone the Color with a new blue value.

With Green

Clone the Color with a new green value.

With Red

Clone the Color with a new red value.

Hsl

Get Hue

Get the hue value.

Get Lightness

Get the lightness value.

Get Saturation

Get the saturation value.

With Hue

Clone the Color with a new hue value.

With Lightness

Clone the Color with a new lightness value.

With Saturation

Clone the Color with a new saturation value.

Hwb

Get Blackness

Get the blackness value.

Get Hue

Get the hue value.

Get Whiteness

Get the whiteness value.

With Blackness

Clone the Color with a new blackness value.

With Hue

Clone the Color with a new hue value.

With Whiteness

Clone the Color with a new whiteness value.

Lab

Get A

Get the a value.

Get B

Get the b value.

Get Lightness

Get the lightness value.

With A

Clone the Color with a new a value.

With B

With Lightness

Clone the Color with a new lightness value.

Lch

Get Chroma

Get the chroma value.

Get Hue

Get the hue value.

Get Lightness

Get the lightness value.

With Chroma

Clone the Color with a new chroma value.

With Hue

Clone the Color with a new hue value.

With Lightness

Clone the Color with a new lightness value.

OkLab

Get A

Get the a value.

Get B

Get the b value.

Get Lightness

Get the lightness value.

With A

Clone the Color with a new a value.

With B

With Lightness

Clone the Color with a new lightness value.

OkLch

Get Chroma

Get the chroma value.

Get Hue

Get the hue value.

Get Lightness

Get the lightness value.

With Chroma

Clone the Color with a new chroma value.

With Hue

Clone the Color with a new hue value.

With Lightness

Clone the Color with a new lightness value.

ProPhoto Rgb

Get Blue

Get the blue value.

Get Green

Get the green value.

Get Red

Get the red value.

With Blue

Clone the Color with a new blue value.

With Green

Clone the Color with a new green value.

With Red

Clone the Color with a new red value.

Rec2020

Get Blue

Get the blue value.

Get Green

Get the green value.

Get Red

Get the red value.

With Blue

Clone the Color with a new blue value.

With Green

Clone the Color with a new green value.

With Red

Clone the Color with a new red value.

Rgb

Get Blue

Get the blue value.

Get Green

Get the green value.

Get Red

Get the red value.

To String

Get the CSS color string.

With Blue

Clone the Color with a new blue value.

With Green

Clone the Color with a new green value.

With Red

Clone the Color with a new red value.

Srgb

Get Blue

Get the blue value.

Get Green

Get the green value.

Get Red

Get the red value.

With Blue

Clone the Color with a new blue value.

With Green

Clone the Color with a new green value.

With Red

Clone the Color with a new red value.

Srgb Linear

Get Blue

Get the blue value.

Get Green

Get the green value.

Get Red

Get the red value.

With Blue

Clone the Color with a new blue value.

With Green

Clone the Color with a new green value.

With Red

Clone the Color with a new red value.

Xyz D50

Get X

Get the x value.

Get Y

Get the y value.

Get Z

Get the z value.

With X

Clone the Color with a new x value.

With Y

Clone the Color with a new y value.

With Z

Clone the Color with a new z value.

Xyz D65

Get X

Get the x value.

Get Y

Get the y value.

Get Z

Get the z value.

With X

Clone the Color with a new x value.

With Y

Clone the Color with a new y value.

With Z

Clone the Color with a new z value.


All versions of color with dependencies

PHP Build Version
Package Version
Requires fyre/macro Version ^2.0
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 ...