1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Color editing

Discussion in 'Civ4 - Creation & Customization' started by Nitram15, Aug 1, 2011.

  1. Nitram15

    Nitram15 Pro Libertate!

    Joined:
    Sep 15, 2009
    Messages:
    1,855
    Location:
    Hungary
    I've been creating mods for a while, and always stuck at the color editing.
    I know how to create colors, add them to the game etc. but can't get the EXACT color I want.

    Probably you don't understand me yet. I mean the colors in civ 4 are not the same RGB values than (ex.) Gimp RGB, the Civ 4 ones are Float values.

    Now I have tons of values I want to implant, but all of them are in 0-255 format (tipycal RGB format).
    For example I have:
    R 9
    G 79
    B 150
    then how can I calculate it to Civ 4 float format?
     
  2. Tholal

    Tholal Chieftain

    Joined:
    May 19, 2009
    Messages:
    1,630
    I believe the float values are percentages of the standard RGB values. So, for example, a value of 256 would convert to 1.0, while a value of 9 would convert to 0.03 (9 divided by 256).

    And then of course, the fAlpha value is for transparency.
     
  3. Nitram15

    Nitram15 Pro Libertate!

    Joined:
    Sep 15, 2009
    Messages:
    1,855
    Location:
    Hungary
    Huh, you seem to be right. Well, I shall try that. ;)
     
  4. Midnight-Blue766

    Midnight-Blue766 A Gentlecolt and a Bard

    Joined:
    Sep 24, 2007
    Messages:
    3,422
    Location:
    Bonnie Scoltland
    Simply divide the RGB value by 255, then input the first two digits of the decimal number you get.
     
  5. Nitram15

    Nitram15 Pro Libertate!

    Joined:
    Sep 15, 2009
    Messages:
    1,855
    Location:
    Hungary
    Yup, I figured out now. :) And it seems to be working.
     

Share This Page