Skip to content
  • Categories
Collapse
Solibri Society Forum
  1. Home
  2. General Discussion
  3. Is it possible to determine element RGB color with Solibri?

Is it possible to determine element RGB color with Solibri?

Scheduled Pinned Locked Moved General Discussion
8 Posts 3 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lraimo
    wrote on last edited by
    #1

    Is it possible to determine element RGB color with Solibri?
    Currently the only method I know is to read it from ifc
    #79=IFCCOLOURRGB($,0.000000,1.000000,1.000000);

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lraimo
      wrote on last edited by
      #2

      Is it possible?

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lasse.lindqvist
        wrote on last edited by
        #3

        Hi. It depends a lot on what you mean by the color.
        The Java API does allow access to the component materials (https://solibri.github.io/Developer-Platform/9.12.4/javadoc/com/solibri/smc/api/model/Component.html#getMaterials())
        which corresponds to the IfcMaterial (http://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/FINAL/HTML/ifcmaterialresource/lexical/ifcmaterial.htm) but that only has a name, not color.

        In the Solibri settings there is the possibility to choose what colors are used in the UI for different component. See Settings - Discipline and Color Map. These colors can be completely different from what the IFC determines as colors.

        Based on discussion here https://forums.buildingsmart.org/t/where-and-how-will-my-colors-be-saved-in-ifc/1806 it seems that colors in IFC are defined in quite many different ways.

        L 1 Reply Last reply
        0
        • L Offline
          L Offline
          lraimo
          wrote on last edited by
          #4

          I am looking for color that comes from this line
          #79=IFCCOLOURRGB($,0.000000,1.000000,1.000000);

          So this line is ACAD 4 (Red 0, Green 255, Blue 255)

          B 1 Reply Last reply
          0
          • B Offline
            B Offline
            b.huijskes
            replied to lraimo on last edited by b.huijskes
            #5

            @lraimo I did some research about Materials and colours a while back. I am not sure if this will help you, but I can post my findings here. Although the text is in Dutch, you should still be able to read most of the images.

            In short: the DataType for colours is an IfcNormalisedRatioMeasure, meaning its value will be between 0 and 1, instead of between 0 and 255 you might be used to for standard RGB.

            To my knowledge, there are only a few Predefined colours within IFC:

            - Black (0 / 0 / 0)
            - Red (1.0 / 0 / 0)
            - Green (0 / 1.0 / 0)
            - Blue (0 / 0 / 1.0)
            - Yellow (1.0 / 1.0 / 0)
            - Magenta (1.0 / 0 / 1.0)
            - Cyan (0 / 1.0 / 1.0)
            - White (1.0 / 1.0 / 1.0)
            

            So even if it were possible to view these values in Solibri through the API, I think it would be tedious to find and translate all the possible values to AutoCAD colours.

            You can find the rest of my findings here: IfcMaterial.pdf

            If you find any mistakes I made, please let me know. I’m always curious to learn more about IFC.

            L 1 Reply Last reply
            0
            • L Offline
              L Offline
              lraimo
              replied to b.huijskes on last edited by
              #6

              @b-huijskes
              Thanks for the material. Google translate helped to understand it.
              I would only need the RGB color assigned to component.
              For example this value
              0.000000,1.000000,1.000000
              From there I could calculate the ACAD color by multiplying them by 255 and using some Excel formulas.
              ACAD colors in RGB https://gohtx.com/acadcolors.php

              1 Reply Last reply
              0
              • L Offline
                L Offline
                lraimo
                replied to lasse.lindqvist on last edited by
                #7

                @lasse-lindqvist
                These elements do not have material (no Material tab in Solibri) but somehow all ifc viewer will show the same color.
                How does Solibri decides what color it will show the element? And is it possible to get this information using API?
                I can send example ifc or smc model if this would help

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  lraimo
                  wrote on last edited by
                  #8

                  @Solibrians
                  Is there any way to determine element RGB color with Solibri?

                  1 Reply Last reply
                  0

                  Copyright © 2025 Solibri Inc. | Powered by NodeBB

                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories