The mechanisms for controlling visual weight are the same in both cases.
Size – As you would expect larger elements carry more weight
Color – It’s not fully understood why, but some colors are perceived as weighing more than others. Red seems to be heaviest while yellow seems to be lightest.
Density – Packing more elements into a given space, gives more weight to that space
Value – A darker object will have more weight than a ligher object
Whitespace – Positive space weighs more than negative space or whitespace