Course Lesson 7 of 11
Colour and type
Layout holds the page. Colour and type make it comfortable to read in bright light and on a tired evening.
Three colours are enough
Section titled “Three colours are enough”Extend your CSS variables:
:root { --ink: #1b1713; --paper: #f7f3eb; --accent: #0c5c56; --accent-ink: #ffffff;}Body text uses --ink on --paper. Links and primary buttons use --accent. Button labels that sit on the accent use --accent-ink. If you cannot read a sample sentence outdoors or near a window, darken the ink or lighten the paper before you invent a fourth colour.
An assistant can suggest palettes. You still paste the values into styles.css and judge them with your eyes. Do not accept a low-contrast “aesthetic” that fails the read test.
Type without a font shopping trip
Section titled “Type without a font shopping trip”System UI fonts are enough for this course:
body { font-family: system-ui, sans-serif; font-size: 1.05rem;}
h1 { font-size: 1.75rem; line-height: 1.2;}
h2 { font-size: 1.35rem; line-height: 1.25;}If you later add a display font, keep body text on a system stack so the page still reads when the webfont is slow.
Links look like links
Section titled “Links look like links”Underline links in body text. Do not rely on colour alone. Buttons can drop the underline and keep a clear shape and label such as “Write to us”.
- Add ink, paper, and accent variables. Apply them to body, links, and one button on Home.
- Set heading and body sizes. Refresh on a phone width.
- Ask an assistant for a second accent only after yours works. Keep one accent unless you can name a job for the second.
- Record the hex values in
notes.mdso a builder does not have to mine the CSS later. - Toggle your OS dark mode if you have it. This course ships a light page on purpose; note that choice.
Before you continue
You are ready for UX copy when:
- ink, paper, and one accent are in CSS and in notes
- body text is comfortable at phone width
- links are visible by colour and underline (or an equivalent clear mark)
Mark this lesson complete when those three are true.