Gradient Fitter
Fit IQ cosine palette parameters to a slice of an image.
Pick two points (A → B). The line becomes a gradient. We hill-climb the palette parameters.
Click to place A, click again to place B. Drag to adjust. Right-click to clear.
No image loaded.
Output format: vec3 a, b, c, d with IQ cosine palette.
Notes
Based on IQ’s palette formula: a + b * cos(2π * (c * t + d)).
We hill-climb parameters to match a sampled gradient along the line segment.
If you want spectral chaos, try higher variation count and lower step size.
Default image (if present): Hubble / ESO “Helix Nebula – Detail Image 3”.
Drop default-nebula.jpg next to this HTML to auto-load it.