Skip to content

Support for two colors in Color field #67

Open

Description

@proimage

What are you trying to do?

I've got a page builder where content editors can create and style buttons. These buttons can have either a solid color BG, or one of a set of pre-defined gradients. There is no single-field way to achieve this.

Right now, I have a regular Craft color field for the flat-color BG selection, and a Button Box Buttons field (the one that supports images) for the gradients, with an image showing the gradient. This is complex and annoying, and with Craft's current "slide-out-sidebar" sub-entry editing approach, very limited in how many buttons can be shown (speaking of which, they really, really need to be able to responsibly wrap onto multiple lines, but that's a separate issue).

What's your proposed solution?

I would love it if the Color field in Button Box supported TWO colors. Nothing complicated; simply add a second color column to the existing table for defining colors.

It would be exponentially more useful to also have a Mode selector for each row of colors, which would control how the two colors were shown to content editors: Split, Foreground/Background, or Gradient.

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions