Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#298 closed defect (fixed)

"color name existing-name" no longer shows definition of built-in colors

Reported by: Elaine Meng Owned by: Greg Couch
Priority: major Milestone:
Component: Logging Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

One used to be able to show the definition of a color with

color name <existing-name>
OR
colordef <existing-name>

This used to work regardless of whether a color was built-in or user-defined. Now it only works for user-defined. It is extremely useful to show the definition of a built-in color, mainly when you want to create a color that is similar to that color, but adjusted to your liking.

Change History (3)

comment:1 by Greg Couch, 10 years ago

Status: newaccepted

'color name blue' works, the confusion comes from 'color name steel blue' since we allow color names with spaces in them. That, however, creates a new color named 'steel' that is a copy of 'blue'. That is, the <existing-name> argument is a string and needs to be quoted if it has spaces in it.

The "simple" fix of allow the name to be a color name or a string makes 'color name steel blue' show the color of steel blue, but makes 'color name steel red' change the steel blue color to red. So to truly fix this, we would need to add another command, ie., 'color show name' that would show the color in the log.

comment:2 by Greg Couch, 10 years ago

Resolution: fixed
Status: acceptedclosed

Separated 'color name' into 'color show <rest of line>' and 'color name <name> <color>' where <name> and <color> are required. Also show the color in the log after defining it.

comment:3 by Elaine Meng, 10 years ago

It is better, but “color name” logging is still confusing.  Currently log shows:

color name steel blue
Color 'steel' is opaque, 0% red, 0% green, and 100% blue 
color show steel blue
Color 'steel blue' is opaque, 27.45% red, 50.98% green, and 70.59% blue 

I suggest changing “color name” logging to something like:

color name steel blue
Defining color 'steel' as opaque, 0% red, 0% green, and 100% blue 

Note: See TracTickets for help on using tickets.