CSS Colors
Understand colors deeply: names, hex, rgb, and when to use each. Learn how color affects user emotion and readability.
Colors decide the **feel** of a website. ## Ways to write colors ### Color names ```css color: red; ``` ### Hex colors ```css color: #ff0000; ``` ### RGB ```css color: rgb(255, 0, 0); ``` ## Background color ```css div { background-color: #f5f5f5; } ``` ## Real world meaning - blue → trust - green → success - red → warning - gray → neutral ## UI example Button with background color: ```css button { background: green; color: white; } ``` ## Remember - Keep contrast readable - Avoid too many bright colors - Consistency matters