Skip to content

Instantly share code, notes, and snippets.

@gdsmith
gdsmith / Color Marks.tmCommand
Last active September 13, 2022 13:16 — forked from sorbits/Color Marks.tmCommand
Textmate command to find, create and add color marks for hex and rgb colors
#!/usr/bin/env ruby -wU
require 'erb'
require 'fileutils'
require 'shellwords'
# extension to String to extract colours into rgb array
class String
# hex to array
def h2a