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

后端 未结 9 1575
余生分开走
余生分开走 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:28

    That is true, but this transformation is not general:

    #FFF == #FFFFFF
    #CCC == #CCCCCC
    

    So it "doubles" each hexadecimal digit. So it is not the same color. It is however possible that it looks the same because the differences are minute. A calibrated color workflow could help in this case.

提交回复
热议问题