Techniques used to shorten code.
If fillStyle is going to be used more than once, turn it into a reusable function.
j=l=>x.fillStyle=l
Use the back-tick character to call methods with a single string argument:
j`lime`
j`red`
j`#0F0`
j`rgba(0,0,0,.05)`
j`#00000005`
For brevity you could use color names instead of the 3 or 6 hex values.
You can add 2 characters to the 6-hex value for the alpha argument, which is shorter than using rgba.
p=[f=50]
Math.random(f=50)
If you need to declare or set a value, you can save a ; semi-colon to do it inside a declared array or as a method argument.
x.font=f+'px A'
r=Math.random