topskill.dev
CoursesTracks
0
All courses/CSSColor Palette
Visual Style
1 / 9
← CSS
○CSS Rule Style an Exhibit Card○Write Your First CSS Rule○CSS Selectors Target Exhibit Details○Target Exhibit Details○Apply CSS Three Sources○Apply CSS Three Ways○Specificity Resolve a Style Conflict○Resolve Specificity○Inheritance and the cascade✦Module Quiz
●Color Palette○Color Palette○Background Layer○Background Layer○Type Rhythm○Type Rhythm○Borders and Shadows○Borders and Shadows✦Module Quiz
○Box Model Seed Packet Card○Space a Seed Packet○Display Swap Table Labels○Arrange Swap Table Labels○Positioning Pickup Pin○Pin the Pickup Location○Sizing and Overflow○Size a Seed-Swap Notice○Sticky scroll headings✦Module Quiz
○Advanced Selectors Book Cart Sign○Target a Book Cart Sign○Pseudo-Classes Night Cart States○Style Night Cart States○Pseudo-Elements○Add a Book-Quote Mark✦Module Quiz
○Lantern Market navigation○Lantern Market navigation✦Module Quiz
○Community garden request card○Community garden request card✦Module Quiz
○Flex Direction○Flex Direction○Main-Axis Spacing○Main-Axis Spacing○Cross-Axis Alignment○Cross-Axis Alignment○Wrapping and Flex Items○Wrapping and Flex Items○Flexbox Navigation○Flexbox Navigation✦Module Quiz
○Grid Tracks○Grid Tracks○Grid Gaps○Grid Gaps○Grid Placement○Grid Placement○Responsive Grid○Responsive Grid✦Module Quiz
○River radio schedule○Harbor radio schedule✦Module Quiz
○Field note color system○Field note color system○Transforms○Rotate a Field Note○Resilient styles✦Module Quiz
○Kite festival signal○Garden festival signal✦Module Quiz
○Garden forecast○Harbor forecast○Fluid sizing○Fluid weather bulletin○Images that fit✦Module Quiz
○Seed inventory table○Tool checkout table✦Module Quiz
○Community maker profile○Maker profile sheet✦Module Quiz

Color Palette

Give the market flyer a color palette

This module moves from museum notes to a Lantern Lane Night Market flyer. The panel needs light text, a dark surface, and a small accent visitors can spot quickly.

In .flyer, background-color: #172554 paints the panel navy. color: #fff7ed sets cream text that its children inherit unless they have their own color rule. The .badge rule gives “Free entry” a coral background and navy text. Background and text colors are separate choices.

A hex color starts with #. In a six-digit code, the pairs describe red, green, and blue amounts. You can also use named colors such as navy, or rgb() values. The tasks give exact colors so you can compare your result. Color alone should not communicate a warning or selected state: keep a text label or another visible cue too. For normal text, WCAG AA asks for at least 4.5:1 contrast against its background (3:1 for qualifying large text). Check the actual text/background pair rather than trusting that a color is “bright.”

The sizing and centering rules are supplied. You will learn Grid and the sizing functions later; leave those rules alone here.

Try a different emphasis

Run and find the cream title, pale-blue details, and coral badge. Change only the badge's background-color to white, then Run again. Its words stay navy while its surface changes. Restore #fb7185 before the ticket exercise.

Learn more

MDN's color property reference explains the available color formats.

Hint 1
1 / 1
HINT 1

Find the selector that matches the part of the flyer you want to recolor.

Files
  • ⋄index.html
  • ⋄style.css
Loading editor…