Skip to content

Instantly share code, notes, and snippets.

View luciascarlet's full-sized avatar
😶‍🌫️
help me

Lucia Scarlet luciascarlet

😶‍🌫️
help me
View GitHub Profile
@luciascarlet
luciascarlet / t3-dark-color-theme.json
Created March 22, 2025 15:08
T3 Chat syntax themes (VS Code, unthemed UI)
{
"name": "T3 Dark",
"colors": {
"editor.background": "#1d1921",
"foreground": "#d2c7e1",
"editor.foreground": "#d2c7e1",
"editorGutter.background": "#1a1419",
"editorLineNumber.foreground": "#b55487"
},
"semanticHighlighting": false,
func kMeans(image: CGImage, limit: Int = 10, iterations: Int = 5, perceptual: Bool = true) -> [CGColor] {
let ciImage = CIImage(cgImage: image)
let space = image.colorSpace!
// kMeans filter returns the dominant colours within an image
let filter = CIFilter.kMeans()
filter.inputImage = ciImage
filter.count = limit
filter.passes = Float(iterations) // why is this a float lol
filter.perceptual = perceptual
let ciResult = filter.outputImage!
@luciascarlet
luciascarlet / Balanced.ini
Last active March 21, 2025 20:34
MacType "Balanced" profile (WinUI-like)
# update v1.1 (see revisions for older version; this has a smoother appearance for both DirectWrite and GDI)
# Use with latest testing version of MacType only.
# Recommended to disable ClearType (not AA) system-wide by setting the FontSmoothingType DWORD to 1 in HKCU/Control Panel/Desktop. Do not do this step if you use Firefox, as it'll cause it to render very crunchy non-antialiased fonts for some text, but it improves Edge/Chrome and Chromium apps.
# Microsoft Edge and Chrome require bypassing the renderer code integrity policy so that vertical AA can be enabled by this profile. More details: https://github.com/snowie2000/mactype/wiki/Google-Chrome
# Additional suggested tweak: use Winaero Tweaker (https://winaero.com/winaero-tweaker/) to change every system font to "Segoe UI Variable Small", if you are using Windows 11. This will make fonts in Win32 UI's consistent with WinUI UI's, where Segoe UI Variable is used. (Windows doesn't use Segoe UI Variable for those by default because the legacy ClearType re