Solved RGB to info.json

Discussion in 'Mod Support' started by Iro, May 10, 2017.

  1. Iro

    Iro
    Expand Collapse
    Banned

    Joined:
    Sep 20, 2015
    Messages:
    2,049
    lets say the rgb values are
    R:156
    G: 188
    B: 235
    How would i convert this into the info.json's color format?
    beamng's color system (example): "Ice": "0.63 0.69 0.83 1.35",
     
  2. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    I Think BeamNG is rgba (red, green, blue, alpha) with alpha controlling how shiny or matte the finish is.
    In which case dividing by 255 (or 256, not sure which is technically correct in this case but it makes near enough no difference) should probably get you the colour you want. Then use 1.35 as the 4th value. You may wish to adjust the 4th slightly to your preference in terms of chrome vs matte.

    What I tend to do is make the colours in beamng and save them as user preset colours. There is then a file you can look in where they are stored and you can copy and paste them from there.
     
    • Agree Agree x 1
  3. Iro

    Iro
    Expand Collapse
    Banned

    Joined:
    Sep 20, 2015
    Messages:
    2,049
    let me make sure i got that right, is it
    R=156/255
    G=188/255
    B=235/255
    if wrong, can you write out an equation?
     
  4. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    That should do it if I am not mistaken.
     
    • Like Like x 1
  5. Iro

    Iro
    Expand Collapse
    Banned

    Joined:
    Sep 20, 2015
    Messages:
    2,049
    Works, thanks! :)
     
    • Like Like x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice