Created
May 17, 2026 21:03
-
-
Save gbroques/87286b67b7ee420b2c12a675dbb15426 to your computer and use it in GitHub Desktop.
dark theme high contrast palette using golden ratio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| unique_clusters = sorted([c for c in np.unique(clusters) if c != 'noise'], key=int) | |
| n_cl = len(unique_clusters) | |
| golden = (1 + 5**0.5) / 2 | |
| colors = {} | |
| for i, c in enumerate(unique_clusters): | |
| h = (i / golden) % 1.0 | |
| s = 0.65 + 0.3 * ((i * 7) % 3) / 2 # vary saturation | |
| l = 0.45 + 0.15 * ((i * 13) % 3) / 2 # vary lightness | |
| colors[c] = colorsys.hls_to_rgb(h, l, s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment