Profile image

Hexadecimal Brightness for Labels

4 Jandy  1.3 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 ("")

((Brightness256<=16)?"00":"")+((Brightness256>16)&(Brightness256<=32)?"10":"")+((Brightness256>32)&(Brightness256<=48)?"20":"")+((Brightness256>48)&(Brightness256<=64)?"30":"")+((Brightness256>64)&(Brightness256<=80)?"40":"")+((Brightness256>80)&(Brightness256<=96)?"50":"")+((Brightness256>96)&(Brightness256<=112)?"60":"")+((Brightness256>112)&(Brightness256<=128)?"70":"")+((Brightness256>128)&(Brightness256<=144)?"80":"")+((Brightness256>144)&(Brightness256<=160)?"90":"")+((Brightness256>160)&(Brightness256<=176)?"A0":"")+((Brightness256>176)&(Brightness256<=192)?"B0":"")+((Brightness256>192)&(Brightness256<=208)?"C0":"")+((Brightness256>208)&(Brightness256<=240)?"D0":"")+((Brightness256>240)&(Brightness256<=255)?"E0":"")+((Brightness256>255)?"FF":"") Other alpha code here if necessary

How to use this?

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

Demo

  • Log in to leave a comment
  • Profile image
    76.6k 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.3 years ago
  • Profile image
    4 Jandy

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

    1.3 years ago