Can >8bit per channel colours be seen as intended in the browser?

For, say, a subtle background gradient to a web page, what are the advantages and disadvantages of saving it as a 16bit/channel png?

Are the colours represented by >8bits displayed in the intended detail in all browsers?

5

Advantages

  • Below 1/256th improvement in gradient display quality

Disadvantages

  • Not all browsers have implemented 48bpp PNG decoding
  • Most displays can’t render the full 8bit/channel gamut as well as they claim to, let alone 16
  • Increased file size

You have to make a value judgement – is it warranted for a background element? Probably not.

2

The advantage of a 8 bits per channel indexed PNG is its size.

The disadvantage is that if the image contains more than 256 colors, the graphics editing program will try to adapt the palette, meaning that some colors will slightly vary. Some programs are smart to pick a well-adapted palette. Some are retarded. Don’t use the last ones.

For a subtle gradient, this disadvantage doesn’t exist, since subtle gradients would hardly use more than 256 colors. To reduce the size of the image even more, you can restrict PNG 8 to use less than 256 colors: for example only 16.

Note about gradients in general:

  • If this is an horizontal or a vertical gradient, ensure the image is one pixel large or one pixel high. This seems obvious, and still, I’ve seen a huge number of designers, programmers and persons specializing in HTML and CSS putting a 1000×150 pixels image in order to have a 150 pixels top-bottom gradient.

  • Unless you should support legacy browsers, consider CSS 3 gradients instead of images. For the browser, the best image in terms of size is no image at all.

  • When you should support legacy browsers, consider CSS 3 gradients anyway. People who are still using Internet Explorer 8 or earlier probably don’t care too much about pretty gradients, shadows or rounded corners. For them, your website will be monotonous, flat and square, but still usable.

Note about graphics editing programs:

  • Using a professional graphics editing program helps. For example in Photoshop, you can instantly see how the image will be rendered with a set of settings, say Perceptual, Diffusion, Colors 16. This enables to quickly try different options and pick the one which is just above the level below which image quality visually decrease.

  • If you don’t have one, you can still save multiple variants of the same image, and then compare it in a viewer side by side.

Note about size of images:

Most users won’t be disgusted by minor JPEG artifacts or PNGs with sub-optimal palette, especially on mobile devices. Speed, on the other hand, matters, especially on mobile devices. If a website is nice but every image takes ages to load because of its size, nobody will use the website. Consider this bias when choosing the appropriate format and settings. In other words, look more at the size of the image and less at the visual quality.

Some other hints:

Playing around with the images and especially PNG 8, you may discover the following:

  • Sometimes, combining several images into one (i.e. create a CSS sprite) is beneficial in terms of performance: not only browsers are requesting one image instead of doing multiple requests, but also this one image is not much larger (and sometimes even smaller¹) than multiple original ones.

  • Also, splitting one image into multiple ones can reduce a lot the overall size when working with PNG 8. I remember going from 200 KB monolithic CSS sprite down to 40 KB by splitting it into ten images. According to the metrics, this effectively had a positive impact on the server, despite the fact that the browser was forced to do ten requests instead of one.


¹ I don’t remember the case when I’ve seen it. If somebody knows such a case, feel free to edit the answer.

3

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật