Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

RGB to GDL

eldhead
Newcomer
Hi,
I´m trying to understand the RGB to GDL conversion,

From the GDL reference manual:

Example:
DEFINE MATERIAL "water" 0,
0.5284, 0.5989, 0.6167,
!Comment surface RGB [0.0..1.0]
...code...
...more code...

How can I translate RGB to GDL?
Archicad 7 - 24, HP ZBook 15 Mobile Workstation, Win 10
4 REPLIES 4
TomWaltz
Participant
The decimal numbers are proportional, so that if RBG is normally done from 0 to 255, the GDL numbers are from 0 to 1, so a value of 127 normally would be about 0.5 in GDL.
Tom Waltz
Anonymous
Not applicable
Hi

I using:
RGB_R= 200 !----    0 to 255
......
DEFINE MATERIAL "water" 0, 
RGB_R/255, RGB_G/255, RGB_B/255, 
.....
TomWaltz
Participant
Lubos

that's a good idea!!
Tom Waltz
eldhead
Newcomer
Thank you!
Archicad 7 - 24, HP ZBook 15 Mobile Workstation, Win 10