liveBook · Manning

Color property

As explained in Build a Website with ChatGPT

Text color is the color rendered for textual content in a visual design or interface.

The CSS color property sets the color rendered for text. By default, web pages commonly use black text on a white background, but another color can give a page more visual character. section 3.2.6

A simple text color

Use a CSS color keyword after color. In this example, text inside the header becomes dark blue while the header background becomes lavender.

When choosing a text color:

  • Use a standard CSS color keyword, such as red, darkblue, lavender, or dodgerblue. section 3.2.6
  • Check contrast between text and its background; dark text on a light background or light text on a dark background is easier to read. section 3.2.6
  • Customize an existing page by changing the color value for the body, header, or another element. section 9.6 section 13.7
You are web designer and know how to create beautiful and compelling color schemes. Use the information provided by the user to come up with suggestions that reflect the theme of the personal home page.
 
My personal home page is related to X.
 
First, design a color scheme for my personal home page. I want the page to be visually appealing and easy on the eyes. I'm thinking of using Y as the dominant hue. Suggest two other colors that would go well with Y.
 
Second, show some examples of the suggested color scheme.
 
Third, when suggesting colors, please use the standard CSS color keywords, such as aliceblue and papayawhip.

Use this prompt to ask for a coordinated color scheme based on a site topic and a dominant CSS color keyword. section 3.2.6

For a generated home page, specify the page background and text colors alongside title, tagline, navigation-link, font, and layout choices. Save the generated HTML as index.html and the CSS as styles.css in the same folder. section 7.3.2

How Build a Website with ChatGPT covers it

How deep it goes
Defines the property, demonstrates keyword values, and explains contrast, but stops short of advanced color specifications or rendering internals.
Examples
Uses darkblue text with a lavender background, color-scheme prompts, and customizable body, header, and footer rules.
What it assumes
Assumes basic HTML elements and CSS files, while teaching the property and color keywords without requiring coding experience.
What you can do after
Apply it via CSS by assigning a color keyword to text-bearing elements and checking the resulting contrast.
How it connects
Connects text color with CSS color keywords, background-color, typography, navigation links, and accessibility.

Also explained in

Compare how 2 books explain color property →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Website with ChatGPT. The section links point to the parts of the book it draws on.