WP Manifestindependent plugin directory
manifest / themes / baizy-color-palette

Baizy Color Palette

ブロックエディターで使用するカラーパレットを管理画面から追加・編集できます。保存したカラーは theme.json のパレットに動的にマージされます。

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/yukiuota/baizy-color-palette/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

ブロックエディターで使用するカラーパレットを管理画面から追加・編集できる WordPress プラグインです。 baizy テーマから独立させたもので、theme.json を持つ任意のテーマで動作します。

  • 保存したカラーは wp_theme_json_data_theme フィルターで theme.json のパレットに動的にマージされます
  • WordPress のデフォルトカラーパレットは非表示になります
  • カラーはオプション(custom_color_palette)に保存されるため、テーマを切り替えてもデータは保持されます

必要環境

  • WordPress 6.0+
  • PHP 8.0+

インストール

  1. このディレクトリを wp-content/plugins/baizy-color-palette/ に配置
  2. 管理画面 →「プラグイン」→「Baizy Color Palette」を有効化

使い方

外観 → カラーパレット から、カラー名とカラーコードのペアを追加・編集・削除できます。 保存するとブロックエディターのカラーパレットに即時反映されます。

  • カラーのスラッグはカラー名から自動生成されます(sanitize_title)
  • 既存コンテンツで使用中のカラーを削除・改名すると、該当箇所の色クラス(has-{slug}-color 等)が解決できなくなる点に注意してください

構成

baizy-color-palette/
├── baizy-color-palette.php        プラグイン本体(管理ページ・保存処理・theme.json マージ)
├── assets/
│   ├── color_palette_admin.css    管理画面スタイル
│   └── color_palette_admin.js     行の追加・削除・カラーピッカー同期
└── views/
    └── color_palette_settings.php 管理ページのビュー