#209 closed defect (fixed)
"color" logging suggestions and bugettes
| Reported by: | Elaine Meng | Owned by: | Greg Couch |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Command Line | Version: | |
| Keywords: | Cc: | Eric Pettersen, Tom Goddard, Conrad Huang | |
| Blocked By: | Blocking: | ||
| Notify when closed: | Platform: | all | |
| Project: | ChimeraX |
Description
Currently “color list" only lists the user-defined colors, not the built-in colors. We agreed that “alias list” should only list the user-defined aliases, which makes sense, but I think a list of the built-in colors might be useful for everybody. We now have “color list internal” to list all the names, but it was intended to be for us insiders and left undocumented.
So commands:
color define squanto rgba(200,150,100,.5)
color define squanto
color list
…give in the Log (omitting the echoed commands):
Color 'squanto' is 50% transparent, 78.43% red, 58.82% green, and 39.22% blue[color swatch]
1 color: squanto
…and command:
color list internal
…gives:
246 colors: alice blue, aliceblue, antique white, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanched almond, blanchedalmond, blue, blue violet, blueviolet, brown, burly wood, burlywood, cadet blue, cadetblue, chartreuse, chocolate, coral, cornflower blue, cornflowerblue, cornsilk, crimson, cyan, dark blue, dark cyan, dark goldenrod, dark gray, dark green, dark grey, dark khaki, dark magenta, dark olive green, dark orange, dark orchid, dark red, dark salmon, dark sea green, dark seagreen, dark slate blue, dark slate gray, dark slate grey, dark turquoise, dark violet, darkblue, darkcyan, darkgoldenrod, darkgray, darkgreen, darkgrey, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deep pink, deep skyblue, deeppink, deepskyblue, dim gray, dim grey, dimgray, dimgrey, dodger blue, dodgerblue, fire brick, firebrick, floral white, floralwhite, forest green, forestgreen, fuchsia, gainsboro, ghost white, ghostwhite, gold, goldenrod, gray, green, green yellow, greenyellow, grey, honeydew, hot pink, hotpink, indian red, indianred, indigo, ivory, khaki, lavender, lavender blush, lavenderblush, lawn green, lawngreen, lemon chiffon, lemonchiffon, light blue, light coral, light cyan, light goldenrod yellow, light gray, light green, light grey, light pink, light salmon, light sea green, light seagreen, light skyblue, light slate gray, light slate grey, light steel blue, light yellow, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgreen, lightgrey, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, lime green, limegreen, linen, magenta, maroon, medium aquamarine, medium blue, medium orchid, medium purple, medium sea green, medium seagreen, medium slate blue, medium spring green, medium turquoise, medium violet red, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnight blue, midnightblue, mint cream, mintcream, misty rose, mistyrose, moccasin, navajo white, navajowhite, navy, old lace, oldlace, olive, olivedrab, orange, orange red, orangered, orchid, pale goldenrod, pale green, pale turquoise, pale violet red, palegoldenrod, palegreen, paleturquoise, palevioletred, papaya whip, papayawhip, peach puff, peachpuff, peru, pink, plum, powder blue, powderblue, purple, rebecca purple, rebeccapurple, red, rosy brown, rosybrown, royal blue, royalblue, saddle brown, saddlebrown, salmon, sandy brown, sandybrown, sea green, seagreen, seashell, sienna, silver, sky blue, skyblue, slate blue, slate gray, slate grey, slateblue, slategray, slategrey, snow, spring green, springgreen, squanto, steel blue, steelblue, tan, teal, thistle, tomato, transparent, turquoise, violet, wheat, white, white smoke, whitesmoke, yellow, yellow green, and yellowgreen
Suggestion #1: the first list should say “user-defined” or “custom”, say
1 user-defined color: squanto
- or -
1 custom color: squanto
Suggestion #2. Love the color swatch, that’s cool! Maybe could be a smidge larger and separated from the preceding text with an space, and how about including the swatches in the lists? Not the details of the component values, you would still need to use “colordef <name>” or “color define <name>" to see that.
Suggestion #3: make a documented “all” option to “color list" that would give both the user-defined and built-in colors, in separate lists. Or maybe “color list” should give all, and some additional keyword would indicate listing only the user-defined colors, e.g. “color list custom".The built-in list could be shortened considerably by including only the version of each multiword color with the spaces instead of both with and without spaces. We could document that they work with the spaces collapsed as well. E.g. “color list all” or “color list” (depending on which we like better) could give something like:
1 custom color:
squanto [swatch]
NNN built-in colors:
alice blue [swatch]
antique white [swatch]
aqua [swatch]
aquamarine [swatch]
[… etc. …]
… possible variations would be to keep the commas and not have each name on a separate line, and/or to put each swatch before the color name instead of after.
Suggestion #4: if a color is completely transparent or completely opaque, the detailed info just says “transparent” or “opaque”. I think it would be better to say “100% transparent” or “100% opaque” (or “0% transparent”, I don’t care).
What do you guys think? I can file a ticket for this and anything below, as appropriate.
Thanks,
Elaine
Minor possible bugs encountered while investigating this command:
(a) the internal color list has a color “transparent” that is reported to be completely transparent black. However, if I use it in “color” the result is completely opaque black. Should this even be a built-in color?? E.g.
colordef transparent
…gives
Color 'transparent' is transparent, 0% red, 0% green, and 0% blue
(b) colordef meh rgba(100,100,150,.99)
colordef
…gives
Color 'meh' is 0.999999% transparent, 39.22% red, 39.22% green, and 58.82% blue [swatch]
… shouldn’t that be 1% transparent? Just rounding, I guess, but still.
Change History (3)
comment:1 by , 10 years ago
| Component: | Unassigned → Command Line |
|---|
comment:2 by , 10 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:3 by , 10 years ago
The "color list all" swatches look good, but would it be possible to (A) put a space between the colorname and the swatch, and (B) only list a given color once, with its longest name (e.g. the one with spaces)?
(C) I think "transparent" should be removed as a color name.
(D): "color list" doesn't list the color if you have only one user-defined color, it just said "1 color:" without anything after that. It works fine when I had two user-defined colors. Strange.
Did 'color list all', call the regulars user-defined colors custom colors, added swatches to listed colors.
"transparent" is a CSS color. I think it's there more for mixing than as an actual color. We could leave it out. I am surprised that it didn't work though, assuming other partially transparent colors work??
Fixed the rounding to be 1% transparent.
Changed plain transparent to 100% transparent in color description.