outl1ne / nova-color-field

A Laravel Nova package that adds a color picker to Nova's arsenal of fields.
MIT License
25 stars 13 forks source link

Alpha channel not working properly using `rgba` mode in Nova 3 (v `1.2`) #16

Closed reppair closed 1 year ago

reppair commented 2 years ago

Hi there.

There are issues using the alpha channel in rgba mode with version 1.2.2 of the package.

RGBA

Using Color::make('rgba')->chrome()->displayAs('rgba')->saveAs('rgba') and picked example color rgba(51, 84, 151, 0.43)

Chrome picker issue

When using the chrome picker, it always defaults to the hex mode/ux of the picker. It would be nice if we can control that with the displayAs() method is used. For example when having displayAs('rgba') chained on the field, when the picker is first opened it should default to the rgba ux/styles of the picker instead of hex.

Even better we can use that to automatically set the format which should be used to store the value.

reppair commented 2 years ago

Was originally part of #12, got a PR for fixing hex8 but not rgba, so extracting it so we can close it but keep this one.

marttinnotta commented 1 year ago

Hi

Sadly we do not support Nova 3 any longer. If you need fix for this you might want to fork this from that version and create a fix for your project.