buildingSMART Forums

Changing colours

I’m just trying to do a quick test.

When open an ifc and search for colour y get some lines as this one:

#188 = IFCCOLOURRGB($, 3.76470588235E-1, 3.76470588235E-1, 3.76470588235E-1);

As Ifc defines the colour as RGB and the definition from ISO10303-46, we can’t see colours in rgb as (255, 102, 057).

Ok, my cuestion is this:

  • first: i want to recognize this colour in an online palette
  • second: i want to choose another colour an get it in this system for changing the #188 line.
    .
    Anyone knows this online tool? I only get conversion tools to hexadecimal and cymk. Maybe is as simple as a mathematical formula but a tool with colour selector will be more usefull
    Thank you in advance

IFC stores RGB colours as a range of 0 … 1, see:
https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2_TC1/HTML/link/ifccolourrgb.htm

Converted into the common 2by8 range of 0 … 255, it would mean that 0 equals 0, and 1 equals 255. The conversion is simply n x 255 => 0 x 255 = 0, and 1 x 255 = 255.

So your colors are:
R = 0.376470588235 x 255 = 96
G = 0,376470588235 x 255 = 96
B = 0.376470588235 x 255 = 96

so it should be a dark grey. The conversion is easy to do in Excel.

Thank you Thomas

I was looking at the ifcolour definition in last 4.1 published version:

https://standards.buildingsmart.org/IFC/DEV/IFC4_3/RC1/HTML/link/ifccolour.htm