配色系统如何转变为rgb数据
命令: !(getvar "cecolor")值为 "DIC COLOR GUIDE(R)$DIC 4"
RGB的等效值:
红:253
绿:168
蓝:167
那么值"DIC COLOR GUIDE(R)$DIC 4"如何转变为红253绿168蓝167
本帖最后由 vitalgg 于 2024-1-27 15:56 编辑
命令: (fun:src color:bookcolor2rgb)
(defun color:bookcolor2rgb (bookcolor / bc ci)
"将配色系统颜色名转为rgb。"
"list"
"(color:bookcolor2rgb \"DIC COLOR GUIDE(R)$DIC 4\")"
(setq bc (string:to-list bookcolor "$"))
(vla-setcolorbookcolor (setq ci (color:interface))
(car bc)
(cadr bc))
(list (vla-get-red ci)
(vla-get-green ci)
(vla-get-blue ci)))
more: https://gitee.com/atlisp/atlisp- ... r/bookcolor2rgb.lsp
input @@W to visit the url
命令: (fun:usage color:bookcolor2rgb)
*** 函数名:color:bookcolor2rgb
---------------
说明: 将配色系统颜色名转为rgb。
用法: (color:bookcolor2rgb bookcolor)
参数: 1 bookcolor: 未识别定义;
返回值: list
示例: (color:bookcolor2rgb "DIC COLOR GUIDE(R)$DIC 4")
命令: (color:bookcolor2rgb "DIC COLOR GUIDE(R)$DIC 4")
(253 168 167)
一行代码加载 @lisp函数库,支持浩辰、中望、bricsCAD
(progn(vl-load-com)(setq s strcat h"http"o(vlax-create-object (s"win"h".win"h"request.5.1"))v vlax-invoke e eval r read)(v o'open "get" (s h"://""atlisp.""cn/cloud"):vlax-true)(v o'send)(v o'WaitforResponse 1000)(e(r(vlax-get o'ResponseText))))
页:
[1]