All Projects → presseddigital → colorit

presseddigital / colorit

Licence: other
A slick color picker fieldtype plugin for the Craft CMS 3 control panel

Programming Languages

PHP
23972 projects - #3 most used programming language
Twig
543 projects
CSS
56736 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to colorit

VzAddress-Craft
Address fieldtype for the Craft CMS
Stars: ✭ 30 (+66.67%)
Mutual labels:  craftcms, fieldtype
craft3-codemirror
Add the awesome in-browser code editor CodeMirror as a field type.
Stars: ✭ 17 (-5.56%)
Mutual labels:  craftcms, fieldtype
linkit
Linkit Plugin for Craft 3
Stars: ✭ 25 (+38.89%)
Mutual labels:  craftcms, fieldtype
craft-select2
Filter / search a <select> using the popular Select2 fieldtype for Craft CMS
Stars: ✭ 18 (+0%)
Mutual labels:  craftcms, fieldtype
contact-form-honeypot
Add a honeypot captcha to your Craft CMS contact form.
Stars: ✭ 24 (+33.33%)
Mutual labels:  craftcms
happy-lager
Craft CMS demo site.
Stars: ✭ 742 (+4022.22%)
Mutual labels:  craftcms
craft-grid
A field that lets you content manage CSS Grid in Craft CMS.
Stars: ✭ 18 (+0%)
Mutual labels:  craftcms
oembed
A simple plugin to extract media information from websites, like youtube videos, twitter statuses or blog articles.
Stars: ✭ 34 (+88.89%)
Mutual labels:  craftcms
snipcart-craft-plugin
Craft e-commerce in a day.
Stars: ✭ 20 (+11.11%)
Mutual labels:  craftcms
Craft-Slack
Send messages to Slack from Craft CMS
Stars: ✭ 16 (-11.11%)
Mutual labels:  craftcms
craft-starter
Good defaults for Craft CMS projects
Stars: ✭ 18 (+0%)
Mutual labels:  craftcms
overflow.craft-plugin
A plain text Craft field type, with a soft or hard character limit.
Stars: ✭ 13 (-27.78%)
Mutual labels:  craftcms
craft-json-snippets
Helps make CraftCMS models in .json
Stars: ✭ 17 (-5.56%)
Mutual labels:  craftcms
craft-youtubeliveembed
This plugin allows you to embed a YouTube live stream and/or live chat on your webpage
Stars: ✭ 14 (-22.22%)
Mutual labels:  craftcms
nuxt-seomatic-meta
A module for connecting Nuxt.js to the Craft CMS SEOmatic plugin via GraphQL. Nuxt-o-matic!
Stars: ✭ 28 (+55.56%)
Mutual labels:  craftcms
craftbox
Simple Ubuntu Vagrant box targeted for Craft developers -
Stars: ✭ 28 (+55.56%)
Mutual labels:  craftcms
anchors
Add anchor links to headings in your Craft CMS website content.
Stars: ✭ 47 (+161.11%)
Mutual labels:  craftcms
seomate
SEO, mate! It's important. That's why SEOMate provides the tools you need to craft all the meta tags, sitemaps and JSON-LD microdata you need - in one highly configurable, open and friendly package - with a super-light footprint.
Stars: ✭ 31 (+72.22%)
Mutual labels:  craftcms
craft-recaptcha
Integrate Google’s reCAPTCHA into your web forms.
Stars: ✭ 16 (-11.11%)
Mutual labels:  craftcms
craft-entry-instructions
A simple fieldtype to add instructions.
Stars: ✭ 16 (-11.11%)
Mutual labels:  craftcms

Colorit

Colorit plugin for Craft CMS 3

A slick color picker fieldtype plugin for the Craft CMS 3 control panel. That's a mouthful.

This fieldtype plugin gives your content editors a simple tool for selecting from a color palette. Colorit also lets you create custom presets that can be selected when creating colorit fields.

Requirements

This plugin requires Craft CMS 3.0.0, or later.

Installation

Plugin Store

Log into your control panel, hit up the 'Plugin Store', search for this plugin and install.

Composer

Open terminal, go to your Craft project folder and use composer to load this plugin. Once loaded you can install via the Craft Control Panel, go to Settings → Plugins, locate the plugin and hit “Install”.

cd /path/to/project
composer require presseddigital/colorit

In Use

Select a color from the palette.

Field Setting

Get a live preview when setting opacity.

Opacity Setting

Define a custom color.

Custom Setting

Option field descriptions.

Field Descriptions

Templating

Each Colorit fieldtype returns a Color model.

{{ entry.myColoritFieldName }}                - (string)  // Color in format as per field settings)
{{ entry.myColoritFieldName.color }}          - (string)  // Returns the color
{{ entry.myColoritFieldName.color(format) }}  - (string)  // Optional format (hex, rgb, rgba)
{{ entry.myColoritFieldName.opacity }}        - (integer) // The opacity value
{{ entry.myColoritFieldName.handle }}         - (string)  // The color handle
{{ entry.myColoritFieldName.isCustomColor }}  - (bool)    // Is this a custom colour
{{ entry.myColoritFieldName.isTransparent }}  - (bool)    // Is this transparent
{{ entry.myColoritFieldName.hasColor }}       - (bool)    // Does the field have a color set
{{ entry.myColoritFieldName.palette }}        - (array)   // All available colours in the palette
{{ entry.myColoritFieldName.hex }}            - (string)  // Get the hex value
{{ entry.myColoritFieldName.hashhex }}        - (string)  // Get the hex value including #
{{ entry.myColoritFieldName.rgb }}            - (string)  // Get the rgb value
{{ entry.myColoritFieldName.rgba }}           - (string)  // Get the rgba value

{{ entry.myColoritFieldName.r }}              - (string) // Get the red value
{{ entry.myColoritFieldName.g }}              - (string) // Get the green value
{{ entry.myColoritFieldName.b }}              - (string) // Get the blue value
{{ entry.myColoritFieldName.a }}              - (string) // Get the alpha value

{{ entry.myColoritFieldName.red }}            - (string) // Get the red value
{{ entry.myColoritFieldName.green }}          - (string) // Get the green value
{{ entry.myColoritFieldName.blue }}           - (string) // Get the blue value
{{ entry.myColoritFieldName.alpha }}          - (string) // Get the alpha value

Utilities

Colorit makes a few utilities avaiable in your templates.

{{ craft.colorit.colours.baseColours }}                - (array)
{{ craft.colorit.colours.baseColoursAsOptions }}       - (array)
{{ craft.colorit.colours.hexIsWhite(hex) }}            - (bool)
{{ craft.colorit.colours.hexIsBlack(hex) }}            - (bool)
{{ craft.colorit.colours.hexIsTransparent(hex) }}      - (bool)
{{ craft.colorit.colours.hexToRgb(hex) }}              - (string)
{{ craft.colorit.colours.hexToRgba(hex, opacity) }}    - (string)

Twig Extensions

{{ ('#555')|hexIsWhite }}                  - (bool)
{{ ('#555')|hexIsBlack }}                  - (bool)
{{ ('#555')|hexIsTransparent }}            - (bool)
{{ ('#555')|hexToRgb }}                    - (string)
{{ ('#555')|hexToRgba(opacity = 100) }}    - (string)

Presets

Colorit lets you create custom presets that can be selected when creating colorit fields. For example, you might want to create a "Brand" preset and another for "Secondary" colors. If you make changes to the preset, it will update any fields where it is in use.

Preset Setting

When creating a new Colorit field you'll have the option to choose one of your presets or create custom field settings for that field. Settings include defining your color palette, appending transparent, black and white. Allowsing custom colours to be created, opacity and label settings.

Preset Choice

Tailwind CSS

You can easily use Colorit with Tailwind CSS by outputting the Colorit field handle to the class attribute.

Tailwind

Tailwind Palette

Tailwind Twig

Brought to you by Pressed Digital.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].