Link Search Menu Expand Document

Use Hex Code for Specific Colors

Summary

  • Hexadecimal code (hex code) can be used to represent colors.
  • Hexadecimals uses base 16 numbers, 0-9 and A-F.
    • 0-9 represents numbers 0-9.
    • A-F represents 10-15.
  • In CSS, 6 hexadecimal digits are used to represent colors.
    • Two each for red, gree, and blue.

Final Code

<style>
  body {
    background-color: #000000;
  }
</style>