-
-
Notifications
You must be signed in to change notification settings - Fork 165
GitHub label color picker
Rob Garrison edited this page Oct 24, 2022
·
13 revisions
A userscript that adds a color picker to the label color input
- This script only works on the
github.com/:user/:repo/labels
page. - ColorPicker is the plugin applied to the label color inputs.
- RGB, HSV, HSL, Hex, CMYK, CMY, XYZ and Lab color entry are all supported.
- The alpha channel is disabled because labels can only be set as a solid color.
- Save up to 8 color swatches.
- Please read the ColorPicker documentation for additional details.
- Click this link to install from GitHub; or, install from GreasyFork or OpenUserJS.
- The ColorPicker plugin allows the saving a maximum of 8 swatches. If you want to add more, please discuss it with the author of the ColorPicker plugin.
- Internally, the swatches are saved in a strict
"rgba(255,255,255,1)"
format, but because I like you I made this userscript accept hex values as well as rgba colors. Please be aware that after saving, all hex colors are coverted into their rgba equivalent - the alpha channel is always set to1
- and therefore the next time you edit the settings, they will be in that format. - To save a color swatch in the popup, click on the far right swatch with a circle. This will remove the eighth swatch!
- Click on the GreaseMonkey/Tampermonkey icon in the browser to open the popup.
- Select the "Set label ColorPicker swatch colors" setting.
- A prompt will open with and input containing the currently set swatch values. Acceptable formats include:
-
#123456
. -
#123
. -
rgba(255, 255, 255, 1)
. - All single and double quotes will be ignored.
-
- Each entry must be separated by a comma, any spaces are ignored.
- Edit and click "OK".
- Reload the page to update the swatch colors.
- Update dependencies.
- Update color settings.
- Fix popup location.
- Update GitHub icon.
- Restore functionality due to recent GitHub layout changes. See pull #45; thanks @darkred!
- Actively update swatch & preview label.
- Update assets.
- Change license to MIT.
- Fix linting.
- Clean up linting issues.
- Fix
renderCallback
to update the input color value.
- Initial commit