Tootfinder

Opt-in global Mastodon full text search. Join the index!

@toxi@mastodon.thi.ng
2025-12-01 16:11:07

Neither #Affinity nor #Darktable seemingly support 1D LUTs, which would have been too easy and useful for my #DigitalNegative preparation tool... Instead they both insist on using only 3D LUT…

Syntax color highlighted TypeScript source code:

```
import {
	cycle,
	map,
	normRange,
	permutations,
	str,
	take,
	transduce,
} from "@thi.ng/transducers";

// LUT size (number of samples per axis)
const N = 9;

// example curve of N samples in [0,1] range
// (the curve here is y = x^1.2, i.e. a basic darken effect)
const curve = [...map((x) => (x ** 1.2).toFixed(4), normRange(N - 1))];

// compute cartesian product to produce RGB tuples
const lut = permutations(curve, curve, curve);

// alt…