Law of Contrast and Similarity with symmetry

P5.js, Law of Contrast, Law of Symmetry, contrast, color
This sample shows a strong contrast between the drawn rectangles. The combination of the color black and white let them look in their composition hard and strong. One reason for the visual perception is that both colors are opposite to each other in the color theory.
var x = y = 0;
var a = b =  250;  

function setup() {
   var canvas = createCanvas(500, 500);
       canvas.parent('sketch');
  background(0);
  smooth();
}

function draw() {
  strokeWeight(2);
  stroke(255);
  noLoop();
  rect(0, y, width, height/2);

  stroke(0);
  rectMode(CENTER);
  blendMode(DIFFERENCE);
  rect(width/2, height/2, a, b);
}