Find colors in your codebase.
Valid hex colors contain a hashbang followed by 3, 4, 6 or 8 hexadecimals, 0-9 or a-f. Negative lookahead to ensure further letters or digits follow to reduce false positives.
| /** DXF merger, author Mika Kuitunen | |
| * Takes multiple DXF files (2D) and merges them into a single Illustrator document using a packing algorithm for placement | |
| * Create file Adobe Illustrator 2025/Presets/en_US/Scripts/DXF-merge.jsx and paste the contents there to use | |
| * | |
| * Instructions: This script expects the file names to end with a part number, group and possible suffix, preceded by ' ' and separated by '-'. | |
| * E.g. 'Project 1 - Flat pattern of 1-a-1.dxf' | |
| * | |
| * 1 - a - 1 | |
| * <partno.> <group> <suffix> | |
| * |
| // Create a file in the path "Adobe Photoshop 2022/Presets/Scripts/Star Trails.jsx" and paste the contents there to use | |
| // Star Trails, author Mika Kuitunen | |
| // DEBUGGING STUFF | |
| function ConsoleLog() { | |
| // Seeing logs: macOS: nc -lvk 8000, Win: install Ncat, then ncat -lk 8000 | |
| this.socket = new Socket(); | |
| this.hostPort = "127.0.0.1:8000"; | |
| } |
| # H.264 variable framerate screencap to constant framerate | |
| ffmpeg -i input.mp4 -c:v libx264 -crf 0 -vsync cfr -filter:v fps=60 output.mp4 |
| import manifest from '../manifest.json'; | |
| // Types | |
| // Better Omit type for Discriminated Union types | |
| // https://github.com/microsoft/TypeScript/issues/31501 | |
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | |
| export type OmitStrict<T, K extends keyof T> = T extends any ? Pick<T, Exclude<keyof T, K>> : never; | |
| export enum PluginMessageType { |
| import numpy as np | |
| from PIL import Image, ImageColor | |
| from colorir import hue_sort_key | |
| with open('colors hexed.txt', 'r') as file: | |
| lines = file.readlines() | |
| colors_sorted = [line.rstrip() for line in lines] | |
| # The alphabetical sort helps grayscale values greatly | |
| colors_sorted.sort() |
| import re | |
| import colorsys | |
| # HTML color names supported by browsers | |
| color_lookup = { | |
| 'aliceblue': '#f0f8ff', | |
| 'antiquewhite': '#faebd7', | |
| 'aqua': '#00ffff', | |
| 'aquamarine': '#7fffd4', | |
| 'azure': '#f0ffff', |
| // Create a file in the path "Adobe Photoshop 2022/Presets/Scripts/Xpan.jsx" and paste the contents there to use | |
| // Xpan Stitcher, author Mika Kuitunen | |
| var runphotomergeFromScript = true; // must be before Photomerge include | |
| //@include "Photomerge.jsx" | |
| //@show include | |
| // DEBUGGING STUFF | |
| function ConsoleLog() { |
| import argparse | |
| import subprocess | |
| import re | |
| import csv | |
| from datetime import datetime | |
| from zoneinfo import ZoneInfo | |
| from enum import Enum | |
| from operator import add |
| adb exec-out screenrecord --bit-rate=16m --output-format=h264 --size 1920x1080 - | ffplay -framerate 60 -framedrop -bufsize 16M - | |
| # Or with scrcpy | |
| brew install scrcpy | |
| scrcpy |