Download the PHP package sylvainjule/color-palette without Composer

On this page you can find all versions of the php package sylvainjule/color-palette. 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-palette

Kirby Color-Palette

A color palette displayed in the panel, helping you pick predefined colors / palettes.

screenshot-palette-cursor


Overview

This plugin is completely free and published under the MIT license. However, if you are using it in a commercial project and want to help me keep up with maintenance, please consider making a donation of your choice or purchasing your license(s) through my affiliate link.


1. Installation

Download and copy this repository to

Alternatively, you can install it with composer:


2. Setup

A basic setup looks like this:

Note that you can fill it with any CSS-valid color:

3. Configuration

3.1. options (required)

The plugin accepts both an array or a structured object.

• Simple colors
• Structured color themes

The field will use the first color of the object as the background-color.

You can add tooltips to structured colors: any color with the tooltip key will show a tooltip on hover.

screenshot-tooltip

• Dynamic options

You can set dynamic options / query your options from a different field. Just make sure the value returns a CSS-valid color.

For example with a structure field:

3.2. display

screenshot-display

The display style of the color blocks, to pick from single or duo . Default is single.

If the selected style is duo and the options are structured color themes, the field will use the first color of the object as the left color, and the second as the right color.

3.3. size

screenshot-size

The size of the color blocks, to pick from small, medium or large. Default is medium.

3.4. unselect

If set to true, selected colors can be unselected. Default is false.

3.5. default

The default value to be used if the field has no set value. Will be ignored if it doesn't match an option. Default is false.


4. Extract palette from an image

4.1. Select manually which image to extract colors from

You can extract a color palette from a page's image file by activating the extractor option. It will override the manual options, if specified. Default is false.

You can restrict the choices to a specific file template with the template option:

4.2. Automatically extract colors when an image matches a template

Alternatively, you can make use of the autotemplate option (do not add the above extractor option in this case).

If the page has at least 1 image matching the given template (if 2+ are found, the field will use the first one), options will automatically be extracted from it on load.

Note that there is no realtime-sync, the page needs to be reloaded in order for the plugin to detect a newly added image. The best way of achieving this without having to manually refresh the page is to place this field and the files section under two different tabs.

4.3. Limit

In both cases, the maximum number of extracted colors can be set with the limit option. Default is 10.


5. Template usage

5.1. If options is an array of simple colors

The field will only store the selected color.

5.2. If options is a structured color object

The field will need to be decoded with the yaml method. For example, if your options look like this:

Here's how to get the selected color:

Note that in this case, the plugin automatically adds the key of the selected color, in case you'd want it to deal with custom classes, etc.

5.3. If the palette has been extracted from an image

Both the selected color and the extracted palette are stored. The value of the field is an array you'll need to decode with the yaml method:


6. License

MIT


7. Credits


All versions of color-palette with dependencies

PHP Build Version
Package Version
Requires getkirby/composer-installer Version ^1.1
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 sylvainjule/color-palette contains the following files

Loading the files please wait ....