Download the PHP package vaersaagod/colormate without Composer

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

ColorMate plugin for Craft CMS

Color me impressed, mate!

Requirements

This plugin requires Craft CMS 4.0.0 or later.

Installation

To install the plugin, either install it from the plugin store, or follow these instructions:

  1. Install with composer via composer require vaersaagod/colormate from your project directory.
  2. Install the plugin in the Craft Control Panel under Settings → Plugins, or from the command line via ./craft install/plugin colormate.

Configuring

ToolMate is configured by creating a file named colormate.php in your Craft config folder, and configuring as needed. Sample config:


Field type

The field type returns a Color model with the following properties and methods:

handle

Handle of preset color if the chosen color was from a preset.

custom

Custom color value.

opacity

Opacity value.

name

Name of preset color if the chosen color was from a preset.

baseColor

The calculated base color, either the custom one, or the color value from the selected preset color.

preset

The preset that was used for the field.

getColor([format = 'rgb'])

Returns the resulting color, either a custom color value or from a preset, with opacity factored into it.

isCustom()

Is the color a custom one?

hasTransparency()

Does the resulting color have transparency?


Template variables / Service methods

All the following methods are available both as template variables, using craft.colormate.<method>(<args>), and as service methods, using ColorMate::$plugin->color-><method>(<args>).

Most methods are wrappers for [ssnepenthe/color-utils](https://github.com/ssnepenthe/color-utils), refer to it for additional documentation.

getColor(color)

adjustColor(color, adjustment)

getBrightness(color)

getHue(color)

getLightness(color)

isBright(color[, threshold = 127.5])

isLight(color[, threshold = 50])

looksBright(color[, threshold = 127.5])

getPercievedBrightness(color)

getRelativeLuminance(color)

getSaturation(color)

getBrightnessDifference(color1, color2)

getColorDifference(color1, color2)

getContrastRatio(color1, color2)

rgb2hex(color)

hex2rgb(hexValue)


Price, license and support

The plugin is released under the MIT license. It's made for Værsågod and friends, and no support is given. Submitted issues are resolved if it scratches an itch.

Changelog

See CHANGELOG.MD.

Credits

Brought to you by Værsågod

Icon designed by Freepik from Flaticon.


All versions of colormate with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
craftcms/cms Version ^4.0.0
ssnepenthe/color-utils Version ~0.4
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 vaersaagod/colormate contains the following files

Loading the files please wait ....