| Author |
Message |
Patrick EMIN
Guest
|
Posted:
Fri Apr 01, 2005 8:18 pm Post subject:
RAL to RGB conversion |
|
|
Hi,
Is there a conversion function from a RAL number to a RGB color?
I need to do that with VBA but cannot find help in AutoCAD help files.
Thanks.
--
/////
(o)-(o)
-----ooO---(_)---Ooo--------------------------
Patrick EMIN www.CADxp.com
Le portail francophone CAO et Nouvelles Technologies
|
|
| Back to top |
|
 |
bcoward
Guest
|
Posted:
Sat Apr 02, 2005 10:03 am Post subject:
Re: RAL to RGB conversion |
|
|
Patrick,
I know there are premise softwares that perform this function but I need a little more information to give an answer.
This is the way I see it:
German RAL colors number over 200...correct?
For Black:
RGB Hex = 00h 00h 00h
RGB Dec = 0 0 0
YCbCr = 0 0 0
CMYK = 0 0 0 255
But the closest RAL color that I see is RAL 9003 or Signal Black (Signalweib). The Blabk-white tones have 14 colors?...correct. But no Black???
So the question is...what do you know that can explain how RAL 9003 could equal a variant of RGB(0,0,0)?
Good luck,
Bob Coward
CADS, Inc
800-366-0946
bcoward@mindspring.com |
|
| Back to top |
|
 |
Patrick EMIN
Guest
|
Posted:
Sat Apr 02, 2005 3:30 pm Post subject:
Re: RAL to RGB conversion |
|
|
bcoward a écrit :
| Quote: | Patrick,
I know there are premise softwares that perform this function but I need a little more information to give an answer.
This is the way I see it:
German RAL colors number over 200...correct?
For Black:
RGB Hex = 00h 00h 00h
RGB Dec = 0 0 0
YCbCr = 0 0 0
CMYK = 0 0 0 255
But the closest RAL color that I see is RAL 9003 or Signal Black (Signalweib). The Blabk-white tones have 14 colors?...correct. But no Black???
So the question is...what do you know that can explain how RAL 9003 could equal a variant of RGB(0,0,0)?
Good luck,
Bob Coward
CADS, Inc
800-366-0946
bcoward@mindspring.com
|
Thanks for answering, what looks to be a more complex problem than I
first thought...
Of course I looked everywhere on the Internet for information.
I found that nice DWF chart done by an australian:
http://www.netspace.net.au/~pgodfrey/yerfdog/Color_Books
It doesn't seem to be possible to make a unique link between a RAL color
code and a RGB color. But my aim is not exactly that, I need to do what
AutoCAD is doing when you display the color palettes, I want, by
program, give a RAL color, let's say 9010, and I want in return the
three RGB values. AutoCAD does it, the only small (big) problem I have
is that this conversion function is not exposed as a LISP or VBA
function. (may be in ObjectARX?)
Thanks for trying to help.
--
/////
(o)-(o)
-----ooO---(_)---Ooo--------------------------
Patrick EMIN www.CADxp.com
Le portail francophone CAO et Nouvelles Technologies
|
|
| Back to top |
|
 |
bcoward
Guest
|
Posted:
Sat Apr 02, 2005 7:16 pm Post subject:
Re: RAL to RGB conversion |
|
|
Patrick,
No problem. I found it to be a very interesting question.
Most of my information was derived from www.proav.de/data/color.html
Good luck,
Bob Coward
CADS, Inc
800-366-0946
bcoward@mindspring.com |
|
| Back to top |
|
 |
Ravi Pothineni
Guest
|
Posted:
Mon Apr 04, 2005 10:13 pm Post subject:
Re: RAL to RGB conversion |
|
|
Try this code.
Sub test()
Dim col As New AutoCAD.AcadAcCmColor
col.SetColorBookColor "RAL CLASSIC", "RAL 1002"
Debug.Print col.Red & "," & col.Green & "," & col.Blue 'This should
print values 210,183,115
End Sub
"Patrick EMIN" <pemin@flowline.fr> wrote in message
news:424d6647$1_1@newsprd01...
| Quote: | Hi,
Is there a conversion function from a RAL number to a RGB color?
I need to do that with VBA but cannot find help in AutoCAD help files.
Thanks.
--
/////
(o)-(o)
-----ooO---(_)---Ooo--------------------------
Patrick EMIN www.CADxp.com
Le portail francophone CAO et Nouvelles Technologies |
|
|
| Back to top |
|
 |
|
|
|
|