Custom Spectrum Palette

Modifies Spectrum color pickers to offer the user’s selection of preset colors.

2022/03/01のページです。最新版はこちら

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
作者
Salvatos
評価
0 0 0
バージョン
1
作成日
2021/12/09
更新日
2022/03/01
大きさ
3.33KB
ライセンス
不明
対象サイト

This Kanka script modifies Spectrum color pickers to offer the user’s selection of preset colors instead of the handful of defaults. This applies to forms such as Events, Relations and Map Markers. Let me know if you find another that would need this.

The script as released will show the same colors as standard, but split into two rows to demonstrate the syntax. To customize your palette, you will need to add your color values in any valid format to the palette setting in the spectrumSettings function, as identified in the script.

  • Each line enclosed in square brackets corresponds to a row of options in the color picker. There is no technical limit to the number of colors per row (that I know of).
  • Each line should end with a comma, except the last row.
  • Values are enclosed in quotation marks and separated by commas.

Valid formats are listed in Spectrum’s documentation: https://bgrins.github.io/spectrum/#details-acceptedColorInputs