Skip to content

Instantly share code, notes, and snippets.

@domlen2003
domlen2003 / colors.ts
Created March 22, 2024 11:54
A tailwind color system, with completely computational max continuous chroma oklch colors.
import colors from 'tailwindcss/colors';
import type { Coords } from 'colorjs.io';
import Color from 'colorjs.io';
/**
* Simple range function to generate an array of numbers
* @param lengthOrStart the length of the array or the start value if end is provided
* @param end the (optional) end value
* @returns an array of numbers in this range
*/
@domlen2003
domlen2003 / twColors.py
Created March 21, 2024 12:43
A visualization+average calculation of Tailwind Lightnesses in Oklch color space
!pip install matplotlib
import matplotlib.pyplot as plt
import numpy as np
import json
grays = [
{
"color": "slate",
"lightness": [ 98.41518630825351, 96.82603461349981, 92.87612611494642, 86.89814311332097,