kirby-color-palette icon indicating copy to clipboard operation
kirby-color-palette copied to clipboard

[K4] 4.0 Compatibility

Open afbora opened this issue 2 years ago • 3 comments

No route found for path: "undefined" and request method: "GET"

Kirby 4.0.0-rc.4 PHP 8.1.23

afbora avatar Nov 28 '23 08:11 afbora

Experiencing the same error with Kirby 4.0.3 and plugin version 1.0.4

mikewink avatar Jan 23 '24 12:01 mikewink

Could it be because of these methods being used:

$file->panelUrl(true)
$file->panelIcon($image)

timkinali avatar Jan 27 '24 14:01 timkinali

If anyone needs this, I made a quick-and-dirty fork of the Color Palette plugin that removes the broken Color Extractor functionality but works with Kirby 4 instead: https://packagist.org/packages/tobimori/kirby-color-palette Not planning to merge this because it just removes functionality but it works for legacy projects.

tobimori avatar Feb 15 '24 13:02 tobimori

Hi everybody. Sorry to unearth this issue a year after. Since your last post, @tobimori (thanks for that), I tried to bring back the Color Extractor feature on which I heavily rely for a legacy website I’d like to upgrade to a recent Kirby version –without any success, despite a lot of struggle and efforts… Would you have any clue, tips or ideas on what should be done?

jbidoret avatar Apr 28 '25 12:04 jbidoret

Unfortunately I do not have any clues on how to work with the Color Extractor again

tobimori avatar Apr 28 '25 12:04 tobimori

Hello,

Apologies for this long overdue reply. Thank you for providing support @tobimori 🙏

Given the current state of the native color field and the fact that it can be set to display options only, it makes little sense to me to refactor then maintain this plugin for K5. The color field query options is more robust and structured color themes can easily be replicated there. If any more features are needed, it would probably be best to extend it rather than write a completely different field like this one.

What is missing in comparison with this plugin though is the ability to extract / pick colors from an image.

I have added support for this in my Color Extractor plugin, adding both a hook + a field method to generate / access a palette. It can be set in such a way that no hook is triggered and the palette generation to only run for dedicated color fields on demand, see the README about this.

A simple alternative to what this plugin does (/ did) would be:

selectedColor:
  type: color
  mode: options
  options:
    type: query
    query: page.fieldname.toFile.getPalette

sylvainjule avatar Aug 05 '25 18:08 sylvainjule