Template:VFG/Time/Code

{{#vardefine:a{{#ifeq:{{#expr:{{{year}}} mod 4|0|{{#expr:{{#var:a}}+8}}|{{#var:a}}}}}}{{#vardefine:old|{{#switch:{{#var:a}}|2|6|8|10|14={{#expr:{{#var:old}}+1}}}}{{#vardefine:leap|1}}}}{{#vardefine:current|{{#switch:{{CURRENTMONTH}}|01=0|02=31|03=59|04=90|05=120|06=151|07=181|08=211|09=242|10=272|11=303|12=333}}}}{{#vardefine:b|{{#ifeq:{{#expr:{{CURRENTMONTH}}>2}}|1|0|-30}}}}{{#vardefine:b|{{#ifeq:{{#expr:{{CURRENTYEAR}} mod 400}}|0|{{#expr:{{#var:b}}+2}}|{{#var:b}}}}}}{{#vardefine:b|{{#ifeq:{{#expr:{{CURRENTYEAR}} mod 100}}|0|{{#expr:{{#var:b}}+4}}|{{#var:b}}}}}}{{#vardefine:b|{{#ifeq:{{#expr:{{CURRENTYEAR}} mod 4|0|{{#expr:{{#var:b}}+8}}|{{#var:b}}}}}}{{#vardefine:current|{{#switch:{{#var:b}}|2|6|8|10|14={{#expr:{{#var:current}}+1}}}}}}{{#vardefine:current|{{#expr:{{#var:current}}+({{CURRENTYEAR}}-{{{year}}})*364}}}}{{#vardefine:current|{{#ifeq:{{#expr:{{CURRENTYEAR}}-{{{year}}}!=0 and {{#var:leap}}=1}}|1|{{#expr:{{#var:current}}+1}}|{{#var:current}}}}}}{{#vardefine:old|{{#expr:{{{day}}}+{{#var:old}}}}}}{{#vardefine:current|{{#expr:{{CURRENTDAY}}+{{#var:current}}}}}}{{#vardefine:shade|{{#expr:{{#var:current}}-{{#var:old}}}}}}{{#switch:{{#var:shade}} }}
 * 1=FAFAFA
 * 2=F5F5F5
 * 3=EFEFEF
 * 4=EAEAEA
 * 5=E5E5E5
 * 6=DFDFDF
 * 7=DADADA
 * 8=D5D5D5
 * 9=CFCFCF
 * 10=CACACA
 * 11=C5C5C5
 * 12=BFBFBF
 * 13=BABABA
 * 14=B5B5B5
 * 15=AFAFAF
 * 16=AAAAAA
 * 17=A5A5A5
 * 18=9F9F9F
 * 19=9A9A9A
 * 20=959595
 * 21=8F8F8F
 * 22=8A8A8A
 * 23=858585
 * 24=7F7F7F color=#FFFFF
 * 25=7A7A7A color=#FFFFF
 * 26=757575 color=#FFFFF
 * 27=6F6F6F color=#FFFFF
 * 28=6A6A6A color=#FFFFF
 * 29=656565 color=#FFFFF
 * 30=5F5F5F color=#FFFFF
 * 31=5A5A5A color=#FFFFF
 * 32=555555 color=#FFFFF
 * 33=4F4F4F color=#FFFFF
 * 34=4A4A4A color=#FFFFF
 * 35=454545 color=#FFFFF
 * 36=3F3F3F color=#FFFFF
 * 37=3A3A3A color=#FFFFF
 * 38=353535 color=#FFFFF
 * 39=2F2F2F color=#FFFFF
 * 40=2A2A2A color=#FFFFF
 * 41=252525 color=#FFFFF
 * 42=1F1F1F color=#FFFFF
 * 43=1A1A1A color=#FFFFF
 * 44=151515 color=#FFFFF
 * 45=0F0F0F color=#FFFFF
 * 46=0A0A0A color=#FFFFF
 * 47=050505 color=#FFFFF
 * 48=000000 color=#FFFFF
 * 49=000011 color=#FFFFF
 * 50=000022 color=#FFFFF
 * 51=000033 color=#FFFFF
 * 54=000044 color=#FFFFF
 * 55=000055 color=#FFFFF
 * 56=000066 color=#FFFFF
 * 57=000077 color=#FFFFF
 * 58=000088
 * 59=000099
 * 60=0000AA
 * 61=0000BB
 * 62=0000CC
 * 63=0000DD
 * 64=0000EE
 * 65=0000FF
 * 66=1111FF
 * 67=2222FF
 * 68=3333FF
 * 69=4444FF
 * 70=5555FF
 * 71=6666FF
 * 72=7777FF
 * 73=8888FF
 * 74=9999FF
 * 75=AAAAFF
 * 76=BBBBFF
 * 77=CCCCFF
 * 78=DDDDFF
 * 79=EEEEFF
 * FFFFFF

Do not modify this template unless your knowledge of parser functions is very high! This template gives a color code based off of a given time and the current time. It alternates from white, to gray, to black, to blue, and then back to white, where it stops.