Reduce two numeric parts to the simplest whole-number ratio while preserving their proportion.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
Components are parsed as numbers, decimal places are scaled to a common integer factor, and the greatest common divisor divides every component. Reduced parts retain original order and proportion.
1920:1080
16:9
Screen designs compare 16:9, recipes scale ingredient parts, and mixture plans reduce measured quantities to whole parts.