maettig.com

CSS Color Converter

Enter anything you want: Hexadecimal, decimal or percentage values, separated by any character(s), with or without the #.

Color: 
       
  • Hexadecimal notation, 6 digits: #FFFFCC
  • Decimal notation, integer values: rgb(255,255,204)
  • Decimal notation, integer values, with alpha: rgba(255,255,204,1)
  • Decimal, percentage values: rgb(100%,100%,80%)
  • Hexadecimal notation, 3 digits: #FFC
  • Hexadecimal notation, web-safe: #FFC
  • Color name: inherit

To calculate the percentage values (0% to 100%), the integer values (0 to 255) are divided by 2.55 and then rounded to whole numbers.

To calculate the short hex values (0 to 9 and A to F), the integer values (0 to 255) are divided by 17 and then rounded to whole numbers.

To calculate the web-safe values (0, 3, 6, 9, C and F), the integer values (0 to 255) are divided by 51, rounded to whole numbers and the multiplied with 3.

More PHP projects →