我创建此函数以创建新层并设置颜色(配色系统)
(defun c:create_layer_default()
(setq layer "aaaa")
(setq cor "DIC COLOR GUIDE(R)$DIC 6")
(command "_.-layer" "_M" layer "_C")
(cond
( ;;;(setq value (cdr (assoc 430 color)))
(setq value cor)
(setq index (vl-string-position 36 value))
(command "_CO" (substr value 1 index) (substr value (+ index 2)) "" "")
)
( (setq value (cdr (assoc 420 color)))
(command "_T"
(substr
(apply 'strcat
(mapcar '(lambda ( x ) (strcat "," (itoa x))) (LM:True->RGB value))
)
2
)
"" ""
)
)
( (setq value (cdr (assoc 62 color)))
(command value "" "")
)
)
)
;; True -> RGB-Lee Mac 2011
;; Args: c - True Colour
(defun LM:True->RGB ( c )
(list
(lsh (lsh (fix c) -24)
(lsh (lsh (fix c) 16) -24)
(lsh (lsh (fix c) 24) -24)
)
)
(princ)
谢谢李和所有人的帮助!。
代码有2个变量
(setq layer“aaaa”)=层
(setq cor“DIC COLOR GUIDE®$DIC 6”)=配色系统
我相信与truecolor一起工作的代码需要测试,
使用配色系统即可;)
页:
1
[2]