Skip to content

Instantly share code, notes, and snippets.

@NamekMaster
Last active August 19, 2022 01:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NamekMaster/2e38ef87a402b59fb22ccd0c848aaff6 to your computer and use it in GitHub Desktop.
Save NamekMaster/2e38ef87a402b59fb22ccd0c848aaff6 to your computer and use it in GitHub Desktop.
Popclip Snippet
# popclip abc
name: Color Preview
icon: square filled C
actions:
- title: RGB HEX
icon: square filled RGB
regex: ^#[0-9a-fA-F]{6}$
applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"
- title: RGBA HEX
icon: square filled RGBA
regex: ^#[0-9a-fA-F]{8}$
applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"
- title: ARGBA HEX
icon: square filled ARGB
regex: ^#[0-9a-fA-F]{8}$
applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"
- title: RGB
icon: square filled RGB
regex: ^rgb\([0-9.,% ]+\)$
applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"
- title: HLS
icon: square filled HLS
regex: ^hls\([0-9.,% ]+\)$
applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"
- title: HLSA
icon: square filled HLSA
regex: ^hlsa\([0-9.,% ]+\)$
applescript: tell application "Shortcuts Events" to run the shortcut named "Show color preview" with input "{popclip text}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment