Profile image

Hexadecimal Brightness for Labels

169 Jandy  1.9 years ago

You can change the brightness of labels in-game with the <alpha=#> code and an input from 0-1 to create a brightness effect in labels.

Ex:
If you have one label thats "unlit" with 0 emission and another label that is the exact same but a different color, maybe green like many backlights in jets, with the exact same stuff written on it but with 100% emission you can adjust the alpha (transparency) of it to create a brightening effect in game with a dial, or any input that ranges from 0-1.

This could also be used for avionics to have an adjustable brightess, but you may need to put the code {MFD=1?"":"<alpha=#00>"} Behind the alpha adjustable brightness code to make sure it doesn't appear when it isnt suppose to.

Below Ive made a hexadecimal translator that takes an input (0-1) and multiplies it by 256 (maximum hexidecimals) then if its between a set of values it converts it to the appropriate hexidecimal, if not it stays as a blank string ("")

((Brightness*256&lt;=16)?&quot;00&quot;:&quot;&quot;)+((Brightness*256>16)&amp;(Brightness*256&lt;=32)?&quot;10&quot;:&quot;&quot;)+((Brightness*256>32)&amp;(Brightness*256&lt;=48)?&quot;20&quot;:&quot;&quot;)+((Brightness*256>48)&amp;(Brightness*256&lt;=64)?&quot;30&quot;:&quot;&quot;)+((Brightness*256>64)&amp;(Brightness*256&lt;=80)?&quot;40&quot;:&quot;&quot;)+((Brightness*256>80)&amp;(Brightness*256&lt;=96)?&quot;50&quot;:&quot;&quot;)+((Brightness*256>96)&amp;(Brightness*256&lt;=112)?&quot;60&quot;:&quot;&quot;)+((Brightness*256>112)&amp;(Brightness*256&lt;=128)?&quot;70&quot;:&quot;&quot;)+((Brightness*256>128)&amp;(Brightness*256&lt;=144)?&quot;80&quot;:&quot;&quot;)+((Brightness*256>144)&amp;(Brightness*256&lt;=160)?&quot;90&quot;:&quot;&quot;)+((Brightness*256>160)&amp;(Brightness*256&lt;=176)?&quot;A0&quot;:&quot;&quot;)+((Brightness*256>176)&amp;(Brightness*256&lt;=192)?&quot;B0&quot;:&quot;&quot;)+((Brightness*256>192)&amp;(Brightness*256&lt;=208)?&quot;C0&quot;:&quot;&quot;)+((Brightness*256>208)&amp;(Brightness*256&lt;=240)?&quot;D0&quot;:&quot;&quot;)+((Brightness*256>240)&amp;(Brightness*256&lt;=255)?&quot;E0&quot;:&quot;&quot;)+((Brightness*256>255)?&quot;FF&quot;:&quot;&quot;)

How to use this?

Copy and paste the above code into <alpha=#{here}>

Demo

  • Log in to leave a comment
  • Profile image

    this is so cool, I'm gonna try and use it for a blackout effect

    one month ago
  • Profile image
    77.2k 2Papi2Chulo

    @Jandy thank you. I want to implement that but that’s a lot of code I need to edit. I might if I have the time.

    1.9 years ago
  • Profile image
    169 Jandy

    @2Papi2Chulo thought you might be able to use this in your f18 MFDs or f18 panels

    1.9 years ago