{"id":"l-fig-1-3","courseId":"figma-ui-design","lang":"en","kind":"lesson","summary":"Define a small type scale with a job for every size, build a color palette from roles instead of favourites, and check every text and control pair against WCAG contrast ratios.","html":"<p>Open the text styles of a file that grew without a plan and you will find 13 px, 14 px, 14.5 px, 15 px and 16 px body text, each used once or twice. Nobody chose them; they drifted in. The result is a screen where hierarchy feels slightly off everywhere, and nobody can say why.</p>\n<p>A type scale and a role-based palette are how you stop the drift. You decide the sizes and colors once, give each a job, and then every screen picks from the list.</p>\n<h2 id=\"sec-1\" tabindex=\"-1\">A type scale with jobs</h2>\n<p>A type scale is a short list of text sizes, each paired with a line height and weight. For a phone app, it helps to start near the platform’s defaults because people’s eyes are already tuned to them. Steady’s scale borrows most of its sizes from Apple’s default text styles, rounds line heights to multiples of 4, and uses 13 px (Apple’s footnote size) for captions:</p>\n<div class=\"table-wrap\" role=\"region\" aria-label=\"Scrollable table\" tabindex=\"0\"><table><thead>\n<tr>\n<th>Role</th>\n<th>Size / line height</th>\n<th>Weight</th>\n<th>Used for</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Large title</td>\n<td>34 / 40</td>\n<td>Bold</td>\n<td>Screen title on the Today screen</td>\n</tr>\n<tr>\n<td>Title</td>\n<td>28 / 36</td>\n<td>Semibold</td>\n<td>Habit detail title</td>\n</tr>\n<tr>\n<td>Headline</td>\n<td>17 / 24</td>\n<td>Semibold</td>\n<td>Habit names, button labels</td>\n</tr>\n<tr>\n<td>Body</td>\n<td>17 / 24</td>\n<td>Regular</td>\n<td>Descriptions, form input</td>\n</tr>\n<tr>\n<td>Subhead</td>\n<td>15 / 20</td>\n<td>Regular</td>\n<td>Progress line, secondary info</td>\n</tr>\n<tr>\n<td>Caption</td>\n<td>13 / 16</td>\n<td>Regular</td>\n<td>Single-line streak counts, tab labels</td>\n</tr>\n</tbody>\n</table></div><p>Notice what the table does. Each step is big enough to read as a different rank. Headline and Body share a size and differ only in weight, which is how you rank text without adding another size. Line heights are about 1.4× for running text and tighter for big titles, because large text with loose line height falls apart into separate lines.</p>\n<figure class=\"diagram\"><svg class=\"diagram-svg\" focusable=\"false\" viewBox=\"0 0 680 300\" role=\"img\" aria-labelledby=\"l-fig-1-3-t1\"><defs><marker id=\"arrow-l-fig-1-3-1\" viewBox=\"0 0 10 10\" refX=\"9\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0 L10 5 L0 10 z\" class=\"d-arrowhead\"/></marker></defs>\n  <title id=\"l-fig-1-3-t1\">Six sample lines from largest to smallest: Large title 34, Title 28, Headline 17 semibold, Body 17 regular, Subhead 15 and Caption 13, each labelled with its size.</title>\n  <text class=\"d-label-strong\" x=\"20\" y=\"50\" style=\"font-size:34px\">Today</text>\n  <text class=\"d-label-muted\" x=\"660\" y=\"48\" text-anchor=\"end\">Large title 34/40</text>\n  <text class=\"d-label-strong\" x=\"20\" y=\"100\" style=\"font-size:28px\">Read 20 pages</text>\n  <text class=\"d-label-muted\" x=\"660\" y=\"96\" text-anchor=\"end\">Title 28/36</text>\n  <text class=\"d-label-strong\" x=\"20\" y=\"148\" style=\"font-size:17px\">Drink water</text>\n  <text class=\"d-label-muted\" x=\"660\" y=\"146\" text-anchor=\"end\">Headline 17/24 semibold</text>\n  <text class=\"d-label\" x=\"20\" y=\"186\" style=\"font-size:17px\">Two glasses before lunch</text>\n  <text class=\"d-label-muted\" x=\"660\" y=\"184\" text-anchor=\"end\">Body 17/24 regular</text>\n  <text class=\"d-label\" x=\"20\" y=\"224\" style=\"font-size:15px\">3 of 5 done</text>\n  <text class=\"d-label-muted\" x=\"660\" y=\"222\" text-anchor=\"end\">Subhead 15/20</text>\n  <text class=\"d-label-muted\" x=\"20\" y=\"260\" style=\"font-size:13px\">12-day streak</text>\n  <text class=\"d-label-muted\" x=\"660\" y=\"258\" text-anchor=\"end\">Caption 13/16</text>\n  <path class=\"d-line\" d=\"M20 280 L660 280\"/>\n</svg><figcaption>Steady’s type scale: size and weight both carry rank</figcaption></figure>\n<p>Two or three weights are enough: Regular, Semibold and Bold here. Each extra weight is one more thing to keep consistent, and readers cannot tell Medium from Semibold at a glance anyway.</p>\n<p>In Figma you save each row as a <strong>text style</strong> (Lesson 3.3 compares styles with variables). Name styles by role, <code dir=\"ltr\">Headline</code> or <code dir=\"ltr\">Caption</code>, not by value like <code dir=\"ltr\">17 Semibold</code>, so you can adjust a size later without the name lying.</p>\n<h2 id=\"sec-2\" tabindex=\"-1\">Color from roles, not favourites</h2>\n<p>Picking colors you like produces a mood board. Picking colors for roles produces a usable palette. Start from the jobs color does on a screen:</p>\n<ul>\n<li><strong>Text</strong>: primary text (near-black, #1A1A1A) and secondary text (grey, #6B7280).</li>\n<li><strong>Surfaces</strong>: the page (#FFFFFF) and raised areas like cards or sheets.</li>\n<li><strong>Borders and dividers</strong>: light grey (#E5E7EB).</li>\n<li><strong>Primary action</strong>: Steady’s teal (#0F766E). It appears on check buttons and the main button, and almost nowhere else.</li>\n<li><strong>Status</strong>: green for success and red for errors, used only for those meanings.</li>\n</ul>\n<p>Restraint is the point. If teal only appears on things you can tap, people learn “teal means tap” within seconds. Paint headings, icons and borders teal too and that lesson becomes impossible to learn.</p>\n<h2 id=\"sec-3\" tabindex=\"-1\">Contrast: the numbers that matter</h2>\n<p>Contrast ratio compares the relative luminance of two colors, from 1:1 (identical) to 21:1 (black on white). The Web Content Accessibility Guidelines (WCAG) 2.2 set the thresholds most teams design to, level AA:</p>\n<ul>\n<li><strong>4.5:1</strong> for normal text.</li>\n<li><strong>3:1</strong> for large text: at least 24 px regular, or about 18.66 px bold (18 pt and 14 pt).</li>\n<li><strong>3:1</strong> for the visible parts of controls and meaningful graphics, such as a checkbox outline or a progress ring against its background.</li>\n</ul>\n<p>Level AAA raises normal text to 7:1. Teams usually aim for AA everywhere and AAA for long reading text.</p>\n<p>Steady’s colors measured against white: primary text #1A1A1A gives 17.40:1, secondary grey #6B7280 gives 4.83:1 (passes, narrowly), and teal #0F766E gives 5.47:1, so a white label on a teal button passes too.</p>\n<aside class=\"callout callout-mistake\" role=\"note\"><p class=\"callout-title\"><svg class=\"icon \" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\"/><path d=\"M12 9v4\"/><path d=\"M12 17h.01\"/></svg><span><span class=\"callout-kind\">Common mistake</span><span class=\"callout-sep\" aria-hidden=\"true\"> · </span>The pretty teal that fails</span></p>\n<p>The first brand teal was #14B8A6, bright and friendly. With a white label it measures 2.49:1, a fail for any text. Light greys for hint text fail the same way: #9CA3AF on white is 2.54:1. Choose the darker shade for anything that carries text, and save the bright one for large illustrations or backgrounds behind dark text.</p>\n</aside>\n<p>Figma has a contrast checker built into the color picker. At the time of writing, you select a text layer, open its fill color, click <strong>Check color contrast</strong>, and Figma shows the ratio against what sits behind the layer, with AA and AAA marks and a one-click fix to the nearest passing color. Use it as you pick colors, not as an audit at the end.</p>\n<aside class=\"callout callout-tip\" role=\"note\"><p class=\"callout-title\"><svg class=\"icon \" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5\"/><path d=\"M9 18h6\"/><path d=\"M10 22h4\"/></svg><span><span class=\"callout-kind\">Tip</span><span class=\"callout-sep\" aria-hidden=\"true\"> · </span>Check both directions</span></p>\n<p>A color that passes on white may fail on your grey card background. Check every text color against every surface it actually sits on, including the pressed and disabled states you add later.</p>\n</aside>\n<p>You now have rules for rank (type), meaning (color) and legibility (contrast). Next you put them on the canvas: frames, groups, layers and constraints, the raw material of every Figma screen.</p>\n","toc":[{"id":"sec-1","text":"A type scale with jobs","level":2},{"id":"sec-2","text":"Color from roles, not favourites","level":2},{"id":"sec-3","text":"Contrast: the numbers that matter","level":2}],"takeaways":["A type scale is a short, fixed list of sizes and line heights, each with a named job; you pick from the list instead of inventing sizes.","Two or three font weights are enough for a whole app; more weights add noise, not hierarchy.","Build color from roles (text, surface, border, primary action, success, danger) and use the accent sparingly so it keeps its meaning.","WCAG AA needs 4.5:1 for normal text, 3:1 for large text, and 3:1 for the visible boundaries of controls and meaningful graphics.","Check contrast while you design with Figma’s color picker, not after a stakeholder complains."],"further":[{"title":"Understanding SC 1.4.3 Contrast (Minimum)","url":"https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html"},{"title":"Understanding SC 1.4.11 Non-text Contrast","url":"https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast.html"},{"title":"Update fills using the color picker (Figma)","url":"https://help.figma.com/hc/en-us/articles/360041003774-Update-fills-using-the-color-picker"},{"title":"WebAIM Contrast Checker","url":"https://webaim.org/resources/contrastchecker/"}],"quiz":[{"q":"<p>Steady’s primary button is a bright teal, #14B8A6, with a white 17 px label. The contrast ratio is 2.49:1. What should you do?</p>","options":[{"text":"Keep it, because buttons only need 3:1.","why":"The 3:1 rule covers the button’s shape against its background. The label is text, so it needs 4.5:1 at this size."},{"text":"Make the label bold, which turns it into large text.","why":"Bold text counts as large from about 18.66 px (14 pt). At 17 px it is still normal text, and 2.49:1 fails even the large-text bar."},{"text":"Darken the teal, for example to","why":"Correct. Darkening the fill keeps the brand hue and lifts the label well past 4.5:1."},{"text":"Add a drop shadow behind the label.","why":"Shadows blur the letter edges and are not counted in the contrast ratio. Fix the colors themselves."}],"answer":2},{"q":"<p>Why does a type scale use a small fixed set of sizes instead of whatever looks right on each screen?</p>","options":[{"text":"Figma cannot store more than six text styles per file.","why":"Figma has no such limit. The constraint is a design choice, not a tool limit."},{"text":"Repeated sizes make the rank of each text predictable across screens, and developers can map them to named styles.","why":"Correct. Consistency is what lets people learn the hierarchy once and reuse it everywhere."},{"text":"Fewer sizes make the app load faster.","why":"Font sizes have no meaningful performance cost. The benefit is consistency."},{"text":"Accessibility rules forbid more than six sizes.","why":"WCAG says nothing about how many sizes you use. It cares about contrast, resizing and readability."}],"answer":1},{"q":"<p>The empty text field in the New habit sheet shows hint text in</p>","options":[{"text":"Hint text is decorative, so it should be even lighter.","why":"Hint text often carries instructions people need to read, so it should still be legible."},{"text":"It is not a problem, because the field’s border already meets 3:1.","why":"Border contrast helps people find the field, but it does nothing for reading the text inside it."},{"text":"It only matters in dark mode.","why":"The ratio is measured in light mode here and it already fails."},{"text":"Many people cannot read 2.54:1 text, so a hint that carries meaning is effectively invisible to them.","why":"Correct. Text that carries meaning needs 4.5:1. If the hint matters, darken it; better still, put the instruction in a visible label."}],"answer":3},{"q":"<p>Which palette plan best supports a clear hierarchy on the Today screen?</p>","options":[{"text":"Neutrals for text and surfaces, one teal for primary actions, and green and red reserved for success and errors.","why":"Correct. With the accent used only for actions, the eye learns that teal means “tap this”."},{"text":"A different color for each habit row so the list feels lively.","why":"Rainbow rows compete with the check buttons and leave no color free to signal state."},{"text":"Teal for headings, buttons, icons, borders and links so the brand is everywhere.","why":"When everything is teal, teal stops meaning anything. The accent loses its power to point at actions."}],"answer":0}],"exercise":{"kind":"fill","language":"text","template":"Steady contrast checklist (WCAG 2.2, level AA)\n\nHabit name, 17 px semibold, on white      needs at least {{0}}:1\nLarge title, 34 px bold, on white          needs at least {{1}}:1\nCheckbox outline against the row surface   needs at least {{2}}:1\nLong-form help text if we aim for AAA      needs at least {{3}}:1\n\nLarge text starts at {{4}} px regular (18 pt).","blanks":[{"answers":["4.5"]},{"answers":["3","3.0"]},{"answers":["3","3.0"]},{"answers":["7","7.0"]},{"answers":["24"]}],"title":"Fill in the contrast thresholds","prompt":"<p>Sofia keeps a contrast checklist pinned beside every screen she designs. Complete Steady’s copy with the WCAG 2.2 minimum ratios and the large-text size. Type numbers only (for example <code dir=\"ltr\">4.5</code>).</p>\n","hints":["Normal-size text has the strictest AA requirement; large text and UI component boundaries share a lower one.","Large text is 18 pt regular or 14 pt bold. In CSS pixels, 18 pt is 18 × 4/3.","AA: 4.5 for normal text, 3 for large text and non-text graphics. AAA for normal text: 7."],"explanation":"<p>A 17 px habit name is normal text, so it needs <strong>4.5:1</strong>, even when it is semibold (bold only counts as large from about 18.66 px). The 34 px title is large text, so <strong>3:1</strong> is the minimum, though you will usually exceed it. The checkbox outline is a visual boundary of a control, covered by SC 1.4.11 Non-text Contrast at <strong>3:1</strong>. AAA raises normal text to <strong>7:1</strong>. Large text starts at <strong>24 px</strong> regular (18 pt × 4/3).</p>\n","checkLabels":{}},"words":813,"readMinutes":4}