From 06b4761f2b297993328b2459e7d8b4e0db4472a9 Mon Sep 17 00:00:00 2001
From: Alexander Rose <alexander.rose@weirdbyte.de>
Date: Mon, 6 Dec 2021 20:02:25 -0800
Subject: [PATCH] add ``carbonLightness`` to illustrative color theme

---
 src/mol-theme/color/illustrative.ts | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mol-theme/color/illustrative.ts b/src/mol-theme/color/illustrative.ts
index 4ced38907..a84adbb62 100644
--- a/src/mol-theme/color/illustrative.ts
+++ b/src/mol-theme/color/illustrative.ts
@@ -17,7 +17,8 @@ const DefaultIllustrativeColor = Color(0xEEEEEE);
 const Description = `Assigns an illustrative color that gives every chain a unique color with lighter carbons (inspired by David Goodsell's Molecule of the Month style).`;
 
 export const IllustrativeColorThemeParams = {
-    ...ChainIdColorThemeParams
+    ...ChainIdColorThemeParams,
+    carbonLightness: PD.Numeric(0.8, { min: -6, max: 6, step: 0.1 })
 };
 export type IllustrativeColorThemeParams = typeof IllustrativeColorThemeParams
 export function getIllustrativeColorThemeParams(ctx: ThemeDataContext) {
@@ -29,7 +30,7 @@ export function IllustrativeColorTheme(ctx: ThemeDataContext, props: PD.Values<I
 
     function illustrativeColor(location: Location, typeSymbol: ElementSymbol) {
         const baseColor = chainIdColor(location, false);
-        return typeSymbol === 'C' ? Color.lighten(baseColor, 0.8) : baseColor;
+        return typeSymbol === 'C' ? Color.lighten(baseColor, props.carbonLightness) : baseColor;
     }
 
     function color(location: Location): Color {
-- 
GitLab