Table of contents
    A bit of color theory
    Subtractive mode
    Additive mode
    Computer graphics from scratch

    Computer graphics from scratch

    .08 May, 2025

    Notes written while going through computer graphics from scratch.

    A bit of color theory

    Subtractive mode

    I've always viewed coloring a paper as putting something on the paper. Actually you are taking something off of the paper.

    1. Paper is initially white, which means it's reflecting lights of all wavelengths back into your eyes

    2. When you draw with a “yellow” crayon, you’re adding a layer of a material that absorbs some wavelengths but lets others pass through it. They’re reflected by the paper, pass through the yellow layer again, hit your eyes, and your brain interprets that particular combination of wavelengths as “yellow.”

    3. Since putting each layer of crayon is "taking away" some number of waves hitting our eyes, all the layers when put on top of each other end up in black. They let no wave pass through. Any combination of two crayons produces a darker variant than the either two colors.

    hello

    Additive mode

    But when putting colors on a screen, we are adding something to the screen. A paper merely reflects light. A screen emanates it. Therefore rgb(255,255,255) produces white.


    Abhimanyu