Actually for true colors the mode_color value represents the print color. I don't understand the color value in this case. It is not the ACI 'equivalent' of the true color.
Style property Color: RGB:91,46,209:
color=-1012575662 (ColorInteger_To_ByteList -1012575662) => (195 165 82 82) => ???
mode_color=-1034211631 (ColorInteger_To_ByteList -1034211631) => (194 91 46 209) => Print color
Style property Color: RGB:91,46,230:
color=-1006698433 (ColorInteger_To_ByteList -1006698433) => (195 255 0 63) => ???
mode_color=-1034211610 (ColorInteger_To_ByteList -1034211610) => (194 91 46 230) => Print color
Hello Roy,
sorry for the delay in my response, but unfortunately lately I've been very busy with other projects.
Thank you very much for your help, I can finally see some light in this project management CTB.
I found the following function, which converts the RGB color ACI:
(defun rgbtoaci (rgbcodes / colorobj)
(vl-load-com)
(setq colorobj (vla-getinterfaceobject (vlax-get-acad-object) "AutoCAD.AcCmColor.18"))
(vla-setrgb colorobj (car rgbcodes) (cadr rgbcodes) (caddr rgbcodes))
(vla-get-colorindex colorobj)
)
Unfortunately it does not work correctly with some colors.
For example.
(rgbtoaci '(221 0 0))) => 12 it's ok!
(rgbtoaci '(184 0 0))) => 12 it's no correct! the correct value is 14
Can you explain to me why this problem?
Do you have any advice?
thanks