Tint screen color code to html

● ARCHIVED · READ-ONLY
Started by Anarcho-paladin 7 posts View original ↗
  1. Hey there.

    Not sure if this is the right place to post this...

    I'm trying to reproduce the "Dark" preset tint screen command (R: -68, G: -68, B: -68, Gy: 0) using the Terrax Lighting System, which uses html color code. So, I'm looking for the html color code to reproduce this "Dark" effect. I tried using online color codes converters, but I can't get them to work, as hex color code goes from 0 to 255, not from -255 to 255, as in RPG Maker...

    There seems to be something I don't know about color programing... Someone could enlighten me?

    Thanks!
  2. even in RPG-Maker, the color numbers range only from 0 to 255 - because you misinterpret the tint, it does NOT use color codes.
    what you see in the tint command is a mathematical operation. it basically says "change the existing color by the numbers given in the tint", and if the result of that mathematical operation is outside 0-255 then it stays at those limits.

    For example "R: -68" means "reduce the red component of any given color by 68. If the result is below 0, then keep zero".
    Or in the other direction "B: +50" means "add 50 to the blue component of any given color. If the result is higher than 255, keep at 255".
  3. So, basically, I can't translate this to an html color code to obtain the same tint via the Terrax Lighting System?

    Subtracting 255 - 68 =187, so I just tried a RGB of 187 each, which gave me a html color code of "bbbbbb", but of course, it didn't work either, as a starting value of 255 to RGB would mean the whole screen to be white...

    I guess I'll just abandon the vanilla tint screen option to go only with Terrax Lighting System's one; I prefer tthe vanilla tint screen's look, but I do prefer consistency even more... Unless there is a way?
  4. you still don't understand.
    the command is called "tint screen" because it tints the screen and NOT a color pixel.
    The screen has thousands of pixels, and as you can see in each tile for your map, those pixels have different colors.

    let's just assume one of your tiles is a wall tile with yellow bricks and brown mortar and perhaps a bit of green for the grass at the bottom.
    so you have dozens of yellow pixels with RGB color 240-230-20, dozens of brown 120-100-30 and dozens of green 0-255-0.
    To that you apply the tint you want, R: -68, G: -68, B: -68.


    So the original yellow becomes 172-162-0, the brown 52-32-0 and the green 0-182-0.

    You cannot set any single number as the basis for the tint mathematics, because the pixels of the map determine the basis - and since each pixel is usually a different number (you don't have maps with only a single color for all pixels), you start with hundreds of different bases depending on your map.

    EDIT:
    most probably that lighting plugin can do something similiar, because every lighting system needs to use color mathematics to determine what is illuminated and what not.
    you simply cannot transfer the numbers directly, because that plugin already has its own mathematics into everything.
    so you need to check that plugin for instructions on how to make a map darker (which usually means manipulating the numbers of the light sources you defined in the plugin and not changing the screen directly)
  5. Well, yes, the plugin's help file does say I can set a tint screen plugin command to #333333 html color code to darken the place. As I explained, this doesn't give the same effect as a "Dark" preset vanilla tint screen, though. I tried different html color code, yet none feels satisfactory.

    Do I understand correctly if I say there is no way to get the same result with a html color code, as it cannot affect each pixel the way the vanilla tint screen command does?
  6. no, not exactly.
    you should be able to get the same effect, but you have to test and guess the correct numbers (for example trying #323232 or #343434 and so on) until you get what you want.
    you can't use the numbers used by the tint screen as a guide because the involved mathematics are different.

    and yes, that will require a lot of tries and testing until you got the hang of how the plugin works.
    Especially because if my guess is right the plugin uses position-based light sources, which means that you might need multiple settings to cover the entire map (what would have been automatic on the screen-based tint screen as opposed to position-based light sources.

    you might want to ask someone in the plugin topic if he already had found the correct numbers...
  7. I see... Well, I'll try that, thanks.