Prompts for colors at the command line
(acad_truecolorcli color [allowbylayer] [alternatePrompt])
(62 . ColorIndex), (420 . TrueColor), or (430 . "colorbook$colorname").A dotted pair that describes the default color. The first element of the dotted pair must be one of the color-related DXF group codes (62, 420, or 430); for example,
nil value enables entering bylayer or byblock to set the color. If set to nil, an error results if bylayer or byblock is entered.Omitting the allowbylayer argument or setting it to a non-
An optional prompt string. If this string is omitted, the default value is âNew colorâ.
nil if the user cancels the dialog box.When the operation is successful, the function returns a list of one or more dotted pairs (depending on the tab on which the color is selected) describing the color selected. The last dotted pair in the list indicates the color selected. The function returns
If the last item in the returned list is a 430 pair, then the specified color originates from a color book. This returned list will also contain a 420 pair that describes the corresponding true color and a 62 pair that describes the closest matching color index value.
If the returned list contains a 420 pair as the last item, then a true color was specified (as âRed,Green,Blueâ). The list will also contain a 62 pair that indicates the closest matching color index. No 430 pair will be present.
If the last item in the list is a 62 pair, then a colorindex was chosen. No other dotted pairs will be present in the returned list.
Prompt for a color selection at the command line with a purple color index default selection and alternative text for the command prompt:
Command: (acad_truecolorcli '(62 . 215) 1 "Pick a color")
New Color [Truecolor/COlorbook] <215>:
((62 . 215))
Prompt for a color selection at the command line with a yellow color index default selection, then set the color by layer:
Command: (acad_truecolorcli '(62 . 2))
New Color [Truecolor/COlorbook] <2 (yellow)>: bylayer
((62 . 256))