This package provides a Color Value Editor which can be used in Neos CMS.
It was inspired by Shel.Neos.ColorPicker, but with the difference that not the color values get saved, but the given key. And it just provides a list of colors, nothing more.
Run this in your site package
composer require --no-update carbon/colorvalues
Then run composer update
in your project directory.
Add a property of type string and configure the editor as seen in this example:
Foo.Bar:Content.Text:
properties:
color:
type: string
ui:
label: Color
reloadIfChanged: true
inspector:
editor: Carbon.ColorValues/Editor
editorOptions:
disabled: false
# If set, this color gets displayed if no value is set
placeholder: gold
# Hides the reset button if set to false
allowEmpty: true
# Set a custom label for the reset button
resetLabel: Custom label
values:
main:
label: Primary
color: '#95c11f'
gray:
label: Gray
color: gray
transparent:
label: Transparent
color: transparent
disabledColor:
label: Disabled color
color: red
disabled: true
A special treatment gets the color preview and select field if the color is set to transparent
; in this case, a checkerboard gets rendered.
Contributions are very welcome!
Please create detailed issues and PRs.