Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
superextinct committed Oct 4, 2019
0 parents commit bd58b96
Show file tree
Hide file tree
Showing 19 changed files with 6,116 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/vendor
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# imagecolor Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.0.0 - 2019-10-02
### Added
- Initial release
9 changes: 9 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License (MIT)

Copyright (c) 2019 Niklas Sonnenschein

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Image + Color

Select an image in the asset field and automatically get the image's dominant color in a color field.

## Requirements

This plugin requires Craft CMS 3.3.0 or later.

## Installation

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

cd /path/to/project

2. Then tell Composer to load the plugin:

composer require hfg/imagecolor

3. In the Control Panel, go to Settings → Plugins and click the “Install” button for imagecolor.

## Usage

```twig
{{ fieldName.asset.getUrl() }}
{{ fieldName.color }}
{{ fieldName.brightness }}
```
37 changes: 37 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "hfg/imagecolor",
"description": "Extracts the dominant color of an image into a color field.",
"type": "craft-plugin",
"version": "1.0.0",
"keywords": [
"craft",
"cms",
"craftcms",
"craft-plugin",
"imagecolor"
],
"license": "MIT",
"authors": [
{
"name": "Niklas Sonnenschein",
"homepage": "https://niklassonnenschein.de"
}
],
"require": {
"craftcms/cms": "^3.0.0-RC1",
"ksubileau/color-thief-php": "^1.4",
"aelvan/imager": "^2.3"
},
"autoload": {
"psr-4": {
"hfg\\imagecolor\\": "src/"
}
},
"extra": {
"name": "imagecolor",
"handle": "imagecolor",
"hasCpSettings": false,
"hasCpSection": false,
"class": "hfg\\imagecolor\\Imagecolor"
}
}
Loading

0 comments on commit bd58b96

Please sign in to comment.