Custom Coloris Palette

Modifies Coloris color pickers in Kanka to offer the user’s selection of preset colors.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

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

This script modifies Coloris color pickers in Kanka to suggest the user’s choice of preset colors. This applies to forms such as Events, Connections and Map Markers, as well as in the Theme Builder. Let me know if you find other places that would need this.

The script as released will not make a visible difference. For it to suggest preset colors, you must define them in one of two ways (or both):

Script-side

You can set your palette by editing the customColors variable in the script itself, following the instructions near the top.

  • Values are enclosed in quotation marks and separated by commas like so: 'navy', '#07b', '#123321', 'rgb(244,162,97)'.
  • All standard web color formats are accepted: named, hexadecimal, RGB(A), HSL, etc.

These presets will be shown on every campaign you visit from the current device.

Campaign-side

A palette can also be defined in a campaign by adding a --coloris-presets custom property to your campaign styles like so:

:root {
  --coloris-presets: navy #07b #123321 #00b4d880 rgb(244,162,97) rgba(0,119,182,0.8) hsl(0,100%,50%);
}

This way, if you use the script on multiple browsers/devices, you can configure your palette directly in the campaign and not worry about updating it on every device. Note that spaces act as a separator between values here, so rgb(244, 162, 97) would be invalid as the script would split it into three parts.

Identical colors from a campaign and your script’s customColors will be shown only once, so you can take a few colors with you everywhere while keeping campaign-specific ones in the campaign CSS, and not worry about duplicates =)


If my scripts are making your life easier, please consider tipping via Ko-fi (no account needed):

Support me on Ko-fi.com