Turn URL in Color documentation into an actual link

This commit is contained in:
Héctor Ramón Jiménez 2025-08-16 09:27:54 +02:00
parent d8f08e78c6
commit 81ed466164
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -197,7 +197,7 @@ impl Color {
}
/// Returns the relative luminance of the [`Color`].
/// https://www.w3.org/TR/WCAG21/#dfn-relative-luminance
/// <https://www.w3.org/TR/WCAG21/#dfn-relative-luminance>
pub fn relative_luminance(self) -> f32 {
let linear = self.into_linear();
0.2126 * linear[0] + 0.7152 * linear[1] + 0.0722 * linear[2]