Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marteinn/wagtail-color-panel
A package that adds new panels for selecting colors, works both on regular page fields and stream field.
https://github.com/marteinn/wagtail-color-panel
input-color wagtail
Last synced: 14 days ago
JSON representation
A package that adds new panels for selecting colors, works both on regular page fields and stream field.
- Host: GitHub
- URL: https://github.com/marteinn/wagtail-color-panel
- Owner: marteinn
- License: mit
- Created: 2020-07-29T08:17:56.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-06T06:47:55.000Z (8 months ago)
- Last Synced: 2024-10-14T01:44:15.790Z (27 days ago)
- Topics: input-color, wagtail
- Language: Python
- Homepage:
- Size: 643 KB
- Stars: 50
- Watchers: 4
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-wagtail - wagtail-color-panel - Introduces panels for selecting colors in Wagtail. (Apps / Widgets)
README
[![Test and publish](https://github.com/marteinn/wagtail-color-panel/actions/workflows/main.yml/badge.svg)](https://github.com/marteinn/wagtail-color-panel/actions/workflows/main.yml) [![PyPI version](https://badge.fury.io/py/wagtail-color-panel.svg)](https://badge.fury.io/py/wagtail-color-panel)
# Wagtail-Color-Panel
Introduces panels for selecting colors in Wagtail.
![Screen1](https://raw.githubusercontent.com/marteinn/wagtail-color-panel/develop/img/img-in-streamfield.png)
## Features
- NativeColorPanel that can be used in your edit handler
- NativeColorBlock for usage in a StreamField
- Based on the native HTML5 color picker
- A custom db field for improved validation
- PolyfillColorPanel for cases that require IE11 support (built on [Spectrum](https://github.com/bgrins/spectrum))## Example
```python
from wagtail.models import Pagefrom wagtail_color_panel.fields import ColorField
from wagtail_color_panel.edit_handlers import NativeColorPanelclass MyPage(Page):
color = ColorField()content_panels = Page.content_panels + [
NativeColorPanel('color'),
]
```## Documentation
- [Getting started](./docs/1_getting_started.md)
- [Adding panel to a Page](./docs/2_adding_to_a_page.md)
- [Adding to a StreamField](./docs/3_adding_to_a_streamfield.md)
- [Reference](./docs/4_reference.md)## Contributing
Want to contribute? Awesome. Just send a pull request.
## License
Wagtail-Color-Panel is released under the [MIT License](http://www.opensource.org/licenses/MIT).