苹果在Safari 27.3测试版中引入了“自适应深色模式”(Adaptive Dark Mode)功能,旨在改善用户在浏览不支持原生深色主题的网站时的体验 1。数据显示,约40%的网页加载请求来自启用深色模式的用户,但仅有10%的页面原生支持深色显示 1。该新功能通过技术手段自动将浅色网站转换为深色界面,同时确保已声明支持深色模式的网站内容保持不变 1。
在技术实现上,自适应深色模式利用色彩矩阵转换技术反转亮度并保留原始色调,遵循WCAG 4.5:1的对比度标准以维持图像完整性和可读性 1。为了强化用户隐私保护,Safari阻止了网站检测该功能的启用状态,即使开启了自适应深色模式,JavaScript查询到的CSS颜色值仍返回原始数据 1。开发者若希望特定页面不被转换,可通过设置color-scheme: light only属性来禁用该功能 1。
Apple has introduced a new feature called Adaptive Dark Mode in the beta version of Safari 27.3 1. This update aims to address the disparity between user preferences and website compatibility, as data indicates that while approximately 40% of web page loads come from users who have enabled dark mode, only 10% of those pages natively support a dark theme 1. The feature automatically converts light-colored websites into a dark display to improve the user experience for sites lacking native dark mode support 1.
The technology behind Adaptive Dark Mode utilizes color matrix transformations to invert brightness while preserving hue integrity 1. It adheres to WCAG 4.5:1 contrast ratio standards to ensure readability and image fidelity 1. For websites that explicitly declare support for dark mode, such as through specific CSS properties, the feature leaves the content unchanged 1. Additionally, developers retain control over this behavior by setting the color-scheme property to light only, which prevents the adaptive conversion on specific pages 1.
Privacy remains a core component of the implementation, with Safari blocking websites from detecting whether Adaptive Dark Mode is active 1. Consequently, JavaScript queries executed by a site will still return the original CSS color values rather than the transformed ones, ensuring that user browsing preferences remain private 1.
评论
还没有评论,欢迎留下第一条。