mirror of
https://github.com/derailed/k9s.git
synced 2026-10-12 02:12:51 +00:00
* feat: add color inversion setting using Oklch Add `k9s.ui.invert: true` config option and `--invert` CLI flag to convert dark themes to light backgrounds, or vice versa. This uses the Oklch perceptual color space with relative chroma preservation for visually balanced results. Color processing is done with the Colorful library, which is already an indirect dependency. * fix: preserve chroma during color inversion by adjusting L Change the color inversion algorithm to preserve chroma (saturation) at the expense of exact lightness inversion. When the ideal inverted lightness would result in insufficient gamut space for the original chroma, L is adjusted toward 0.5 where the sRGB gamut is larger. This improves color differentiation after inversion. For example, cyan and green previously both became nearly black (L≈0.10) with minimal chroma, making them hard to distinguish. Now they invert to L≈0.45 with preserved chroma, maintaining their visual difference. The chromaPreserveFactor constant (0.5) controls how much original chroma to preserve, balancing color differentiation against L fidelity. * fix: resolve golangci-lint warnings in color code Use lowercase variable names per Go conventions and remove unnecessary fmt.Sprintf wrappers in test assertions. --------- Co-authored-by: Fernand Galiana <[email protected]>