﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
1331	Attempted override of builtin color produces traceback	Elaine Meng	Eric Pettersen	"{{{
The following bug report has been submitted:
Platform:        Darwin-17.7.0-x86_64-i386-64bit
ChimeraX Version: 0.8 (2018-09-26)
Description
trying to redefine builtin color gives traceback

Very minor bug.  I agree it should not be possible to redefine a builtin color, but should give message rather than traceback.  Example command: color name red 80,80,80

Log:
UCSF ChimeraX version: 0.8 (2018-09-26)  
How to cite UCSF ChimeraX  

open /Users/meng/Desktop/glorb.cxs format session ↵

opened ChimeraX session  

color glorb ↵

color name glorb 80,80,50 ↵

Color 'glorb' is opaque, 80% red, 80% green, and 50% blue 

  

color glorb ↵

color name glorb 50,50,20 ↵

Color 'glorb' is opaque, 50% red, 50% green, and 20% blue 

  

color glorb ↵

color name red 80,80,80 ↵

Traceback (most recent call last):  
  File
""/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/chimerax/cmd_line/tool.py"", line 205, in execute  
    cmd.run(cmd_text)  
  File
""/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/chimerax/core/commands/cli.py"", line 2561, in run  
    result = ci.function(session, **kw_args)  
  File
""/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/chimerax/std_commands/colorname.py"", line 32, in name_color  
    session.user_colors.add(name, color)  
  File
""/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/chimerax/core/colors.py"", line 70, in add  
    raise ValueError('Can not override builtin color')  
ValueError: Can not override builtin color  
  

ValueError: Can not override builtin color  
  
File
""/Users/chimera/Applications/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-
packages/chimerax/core/colors.py"", line 70, in add  
raise ValueError('Can not override builtin color')  
  
See log for complete Python traceback.  
  




OpenGL version: 4.1 NVIDIA-10.32.0 355.11.10.10.40.102
OpenGL renderer: NVIDIA GeForce GTX 675MX OpenGL Engine
OpenGL vendor: NVIDIA Corporation

}}}
"	defect	closed	normal		Core		fixed						all	ChimeraX
