
Hi all, I wrote a script to color code individual chains of a structure based on fold change values. When I plug the resulting rgb values in ChimeraX, the colors that are rendered are off by quite a bit in some cases. Attached is an example demonstrating such a difference. On the left is shown the color provided for the selected chain, which shows correctly in the 'Select color' window as rgb(196,216,214). However the resulting structure rendered has a different actual color (rgb(227,251,248), as measured with eyedropper tool in Illustrator). This variation is not consistent, colors with higher saturation are not impacted as much, but can still be a bit off. I am using flat lighting with depthcue off, which I believe should mean that no shadows could affect the rendering. I have tried providing colors in other formats such as hex with no difference. I just updated to ChimeraX version 1.7.1 which also did not help (Windows). Please let me know if I am missing anything obvious. Thanks in advance! Regards, Elie

Hi Elie, Nothing is attached to your message .... and besides the image (which I guess is what you meant to attach), would also be useful to see the exact command used to color the structure in case anything is wrong with it and also so that we can try the same command. Thanks, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 17, 2024, at 2:23 PM, Élie Lambert via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi all,
I wrote a script to color code individual chains of a structure based on fold change values. When I plug the resulting rgb values in ChimeraX, the colors that are rendered are off by quite a bit in some cases. Attached is an example demonstrating such a difference. On the left is shown the color provided for the selected chain, which shows correctly in the ‘Select color’ window as rgb(196,216,214). However the resulting structure rendered has a different actual color (rgb(227,251,248), as measured with eyedropper tool in Illustrator).
This variation is not consistent, colors with higher saturation are not impacted as much, but can still be a bit off. I am using flat lighting with depthcue off, which I believe should mean that no shadows could affect the rendering. I have tried providing colors in other formats such as hex with no difference. I just updated to ChimeraX version 1.7.1 which also did not help (Windows).
Please let me know if I am missing anything obvious. Thanks in advance!
Regards, Elie

Hi Elie, There is always lighting in ChimeraX, flat lighting is lighting, without lighting the models would be black. In flat lighting the lighting "ambientIntensity" parameter I see is 1.45 and if I change it it changes the brightness of the colors. The lighting command with no arguments will tell you the settings lighting <cxcmd:lighting>Intensity: 0 Direction: 0.577,-0.577,-0.577 Color: 100,100,100 Fill intensity: 0 Fill direction: -0.2,-0.2,-0.959 Fill color: 100,100,100 Ambient intensity: 1.45 Ambient color: 100,100,100 Depth cue: 1, start 0.5, end 1, color 0,0,0 Shadow: False (depth map size 2048, depth bias 0.005) Multishadows: 0 (max 1024, depth map size 1024, depth bias 0.01) Then I can change the ambient intensity using lighting ambientIntensity 1 <cxcmd:lighting ambientIntensity 1> I am not sure if any ambientIntensity value will reproduce the colors on screen with the same color assigned to the model. Tom
On Apr 17, 2024, at 2:23 PM, Élie Lambert via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi all,
I wrote a script to color code individual chains of a structure based on fold change values. When I plug the resulting rgb values in ChimeraX, the colors that are rendered are off by quite a bit in some cases. Attached is an example demonstrating such a difference. On the left is shown the color provided for the selected chain, which shows correctly in the ‘Select color’ window as rgb(196,216,214). However the resulting structure rendered has a different actual color (rgb(227,251,248), as measured with eyedropper tool in Illustrator).
This variation is not consistent, colors with higher saturation are not impacted as much, but can still be a bit off. I am using flat lighting with depthcue off, which I believe should mean that no shadows could affect the rendering. I have tried providing colors in other formats such as hex with no difference. I just updated to ChimeraX version 1.7.1 which also did not help (Windows).
Please let me know if I am missing anything obvious. Thanks in advance!
Regards, Elie _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu <mailto:chimerax-users-leave@cgl.ucsf.edu> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Hello, I played around with the ambient intensity quickly, and a value of 1.25 gave basically the same atom colors between ChimeraX and screen grab. Best, Tony On Wed, Apr 17, 2024 at 3:36 PM Tom Goddard via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hi Elie,
There is always lighting in ChimeraX, flat lighting is lighting, without lighting the models would be black. In flat lighting the lighting "ambientIntensity" parameter I see is 1.45 and if I change it it changes the brightness of the colors. The lighting command with no arguments will tell you the settings
lighting Intensity: 0 Direction: 0.577,-0.577,-0.577 Color: 100,100,100 Fill intensity: 0 Fill direction: -0.2,-0.2,-0.959 Fill color: 100,100,100 Ambient intensity: 1.45 Ambient color: 100,100,100 Depth cue: 1, start 0.5, end 1, color 0,0,0 Shadow: False (depth map size 2048, depth bias 0.005) Multishadows: 0 (max 1024, depth map size 1024, depth bias 0.01)
Then I can change the ambient intensity using
lighting ambientIntensity 1
I am not sure if any ambientIntensity value will reproduce the colors on screen with the same color assigned to the model.
Tom
On Apr 17, 2024, at 2:23 PM, Élie Lambert via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hi all,
I wrote a script to color code individual chains of a structure based on fold change values. When I plug the resulting rgb values in ChimeraX, the colors that are rendered are off by quite a bit in some cases. Attached is an example demonstrating such a difference. On the left is shown the color provided for the selected chain, which shows correctly in the ‘Select color’ window as rgb(196,216,214). However the resulting structure rendered has a different actual color (rgb(227,251,248), as measured with eyedropper tool in Illustrator).
This variation is not consistent, colors with higher saturation are not impacted as much, but can still be a bit off. I am using flat lighting with depthcue off, which I believe should mean that no shadows could affect the rendering. I have tried providing colors in other formats such as hex with no difference. I just updated to ChimeraX version 1.7.1 which also did not help (Windows).
Please let me know if I am missing anything obvious. Thanks in advance!
Regards, Elie _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Hi Elaine, Tom and Tony, Thank you so much for such prompt replies! The ambient intensity setting was not something I had thought of, 1.25 is indeed right on the money. I have tested it and the actual rendered color is the exact same rgb value as my input. I had forgotten the attachment as you noted, here it is for future reference if needed. Thank you again for being so helpful. Kind regards, Elie From: Tony Schaefer <tony.schaefer.chem@gmail.com> Sent: Wednesday, April 17, 2024 17:41 To: Tom Goddard <goddard@sonic.net> Cc: Élie Lambert <elie.lambert@umontreal.ca>; chimerax-users@cgl.ucsf.edu Subject: Re: [chimerax-users] Re: Color accuracy in ChimeraX / flat lighting Hello, I played around with the ambient intensity quickly, and a value of 1.25 gave basically the same atom colors between ChimeraX and screen grab. Best, Tony On Wed, Apr 17, 2024 at 3:36 PM Tom Goddard via ChimeraX-users <chimerax-users@cgl.ucsf.edu<mailto:chimerax-users@cgl.ucsf.edu>> wrote: Hi Elie, There is always lighting in ChimeraX, flat lighting is lighting, without lighting the models would be black. In flat lighting the lighting "ambientIntensity" parameter I see is 1.45 and if I change it it changes the brightness of the colors. The lighting command with no arguments will tell you the settings lighting Intensity: 0 Direction: 0.577,-0.577,-0.577 Color: 100,100,100 Fill intensity: 0 Fill direction: -0.2,-0.2,-0.959 Fill color: 100,100,100 Ambient intensity: 1.45 Ambient color: 100,100,100 Depth cue: 1, start 0.5, end 1, color 0,0,0 Shadow: False (depth map size 2048, depth bias 0.005) Multishadows: 0 (max 1024, depth map size 1024, depth bias 0.01) Then I can change the ambient intensity using lighting ambientIntensity 1 I am not sure if any ambientIntensity value will reproduce the colors on screen with the same color assigned to the model. Tom On Apr 17, 2024, at 2:23 PM, Élie Lambert via ChimeraX-users <chimerax-users@cgl.ucsf.edu<mailto:chimerax-users@cgl.ucsf.edu>> wrote: Hi all, I wrote a script to color code individual chains of a structure based on fold change values. When I plug the resulting rgb values in ChimeraX, the colors that are rendered are off by quite a bit in some cases. Attached is an example demonstrating such a difference. On the left is shown the color provided for the selected chain, which shows correctly in the ‘Select color’ window as rgb(196,216,214). However the resulting structure rendered has a different actual color (rgb(227,251,248), as measured with eyedropper tool in Illustrator). This variation is not consistent, colors with higher saturation are not impacted as much, but can still be a bit off. I am using flat lighting with depthcue off, which I believe should mean that no shadows could affect the rendering. I have tried providing colors in other formats such as hex with no difference. I just updated to ChimeraX version 1.7.1 which also did not help (Windows). Please let me know if I am missing anything obvious. Thanks in advance! Regards, Elie _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu<mailto:chimerax-users@cgl.ucsf.edu> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu<mailto:chimerax-users-leave@cgl.ucsf.edu> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/ _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu<mailto:chimerax-users@cgl.ucsf.edu> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu<mailto:chimerax-users-leave@cgl.ucsf.edu> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Hi Tony, Elie, If you are curious why ambient intensity 1.25 is the right value it is because the ChimeraX default material ambient reflectivity is 0.8 (= 1 / 1.25) as shown by the ChimeraX "material" command material <cxcmd:material>Reflectivity: 0.8 Specular reflectivity 0.3 Specular exponent: 30 Ambient reflectivity 0.8 Transparent cast shadows: false Meshes cast shadows: false Tom
On Apr 17, 2024, at 2:54 PM, Élie Lambert <elie.lambert@umontreal.ca> wrote:
Hi Elaine, Tom and Tony,
Thank you so much for such prompt replies! The ambient intensity setting was not something I had thought of, 1.25 is indeed right on the money. I have tested it and the actual rendered color is the exact same rgb value as my input.
I had forgotten the attachment as you noted, here it is for future reference if needed.
Thank you again for being so helpful.
Kind regards, Elie
From: Tony Schaefer <tony.schaefer.chem@gmail.com <mailto:tony.schaefer.chem@gmail.com>> Sent: Wednesday, April 17, 2024 17:41 To: Tom Goddard <goddard@sonic.net <mailto:goddard@sonic.net>> Cc: Élie Lambert <elie.lambert@umontreal.ca <mailto:elie.lambert@umontreal.ca>>; chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] Re: Color accuracy in ChimeraX / flat lighting
Hello,
I played around with the ambient intensity quickly, and a value of 1.25 gave basically the same atom colors between ChimeraX and screen grab.
Best,
Tony
On Wed, Apr 17, 2024 at 3:36 PM Tom Goddard via ChimeraX-users <chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu>> wrote: Hi Elie,
There is always lighting in ChimeraX, flat lighting is lighting, without lighting the models would be black. In flat lighting the lighting "ambientIntensity" parameter I see is 1.45 and if I change it it changes the brightness of the colors. The lighting command with no arguments will tell you the settings
lighting Intensity: 0 Direction: 0.577,-0.577,-0.577 Color: 100,100,100 Fill intensity: 0 Fill direction: -0.2,-0.2,-0.959 Fill color: 100,100,100 Ambient intensity: 1.45 Ambient color: 100,100,100 Depth cue: 1, start 0.5, end 1, color 0,0,0 Shadow: False (depth map size 2048, depth bias 0.005) Multishadows: 0 (max 1024, depth map size 1024, depth bias 0.01)
Then I can change the ambient intensity using
lighting ambientIntensity 1
I am not sure if any ambientIntensity value will reproduce the colors on screen with the same color assigned to the model.
Tom
On Apr 17, 2024, at 2:23 PM, Élie Lambert via ChimeraX-users <chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu>> wrote:
Hi all,
I wrote a script to color code individual chains of a structure based on fold change values. When I plug the resulting rgb values in ChimeraX, the colors that are rendered are off by quite a bit in some cases. Attached is an example demonstrating such a difference. On the left is shown the color provided for the selected chain, which shows correctly in the ‘Select color’ window as rgb(196,216,214). However the resulting structure rendered has a different actual color (rgb(227,251,248), as measured with eyedropper tool in Illustrator).
This variation is not consistent, colors with higher saturation are not impacted as much, but can still be a bit off. I am using flat lighting with depthcue off, which I believe should mean that no shadows could affect the rendering. I have tried providing colors in other formats such as hex with no difference. I just updated to ChimeraX version 1.7.1 which also did not help (Windows).
Please let me know if I am missing anything obvious. Thanks in advance!
Regards, Elie _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu <mailto:chimerax-users-leave@cgl.ucsf.edu> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu <mailto:chimerax-users-leave@cgl.ucsf.edu> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/ <ChimeraX_Colors_FlatLighting.png>
participants (4)
-
Elaine Meng
-
Tom Goddard
-
Tony Schaefer
-
Élie Lambert