How can I use 3-digit color codes rather than 6-digit color codes in CSS?

后端 未结 9 1560
余生分开走
余生分开走 2020-12-02 12:22

I recently went through my CSS file and switched all my six-digit hexadecimal codes to simple three-digit codes (for example, my #FDFEFF got shortened to

9条回答
  •  执笔经年
    2020-12-02 12:37

    It is not possible. Please go through how the hexadecimal color code works. For a few color codes, we can reduce it to three digits, however, for the many hexadecimal color codes we cannot turn that down to three digits. Please check the below links for the further clarification.

    • CSS 3 Digit Hex Colors
    • CSS 6 Digit Hex Colors

提交回复
热议问题