From 5eddaa480e24e1d124f084e6ecec4e80dc45f27b Mon Sep 17 00:00:00 2001 From: AmaiKinono Date: Sun, 22 Sep 2024 23:19:55 +0800 Subject: [PATCH 1/2] Add hsl and hsla color declarations --- pages/rcss/syntax.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pages/rcss/syntax.md b/pages/rcss/syntax.md index 2017ec6..9d6d48d 100644 --- a/pages/rcss/syntax.md +++ b/pages/rcss/syntax.md @@ -98,6 +98,7 @@ Specified as ``{:.value} in the property's Values list. Colours represen * Prefixed with the '#' character, followed by 3, 4, 6 or 8 hexadecimal digits. 3 or 6 digits represent an RGB triplet, and will have 255 attached as the opacity. If only 3 are specified, each digit will be replicated before being read; for example, #FE0 is equivalent to #FFEE00. 4 or 8 digits allow the specification of a translucent colour. * In the format `rgb(r, g, b)`{:.value} or `rgba(r, g, b, a)`{:.value}, where each of red, green, blue (and optionally alpha) is specified as a value from 0 to 255. An rgb value has an alpha of 255 attached. * In the format `rgb(r%, g%, b%)`{:.value} or `rgba(r%, g%, b%, a%)`{:.value}, where each of red, green, blue (and optionally alpha) is specified as a percentage value from 0 to 100. An rgb value will have full opacity. +* In the format `hsl(h, s%, l%)`{:.value} or `hsla(h, s%, l%, a)`{:.value}. `h` is the hue in degrees, and is wrapped into [0, 360) internally. `s` and `l` are saturation and lightness as percentage values from 0 to 100. `a` is the alpha value from 0.0 to 1.0. **Important**: Note that the declaration of the alpha channel when using the rgba keyword differs from the HTML5 specification. @@ -110,6 +111,8 @@ color: #FF0000FF; color: rgb(100%, 0%, 0%); color: rgba(100%, 0%, 0%, 100%); color: rgba(255, 0, 0, 255); +color: hsl(0, 100%, 50%); +color: hsl(0, 100%, 50%, 1.0); ``` #### Resolution From 9fc63f04eea8b10a1d279393ee56e7bfbaf5fae2 Mon Sep 17 00:00:00 2001 From: "Michael R. P. Ragazzon" Date: Sun, 22 Sep 2024 18:07:41 +0200 Subject: [PATCH 2/2] Smaller wording changes --- pages/rcss/syntax.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/rcss/syntax.md b/pages/rcss/syntax.md index 9d6d48d..d0650a9 100644 --- a/pages/rcss/syntax.md +++ b/pages/rcss/syntax.md @@ -98,7 +98,7 @@ Specified as ``{:.value} in the property's Values list. Colours represen * Prefixed with the '#' character, followed by 3, 4, 6 or 8 hexadecimal digits. 3 or 6 digits represent an RGB triplet, and will have 255 attached as the opacity. If only 3 are specified, each digit will be replicated before being read; for example, #FE0 is equivalent to #FFEE00. 4 or 8 digits allow the specification of a translucent colour. * In the format `rgb(r, g, b)`{:.value} or `rgba(r, g, b, a)`{:.value}, where each of red, green, blue (and optionally alpha) is specified as a value from 0 to 255. An rgb value has an alpha of 255 attached. * In the format `rgb(r%, g%, b%)`{:.value} or `rgba(r%, g%, b%, a%)`{:.value}, where each of red, green, blue (and optionally alpha) is specified as a percentage value from 0 to 100. An rgb value will have full opacity. -* In the format `hsl(h, s%, l%)`{:.value} or `hsla(h, s%, l%, a)`{:.value}. `h` is the hue in degrees, and is wrapped into [0, 360) internally. `s` and `l` are saturation and lightness as percentage values from 0 to 100. `a` is the alpha value from 0.0 to 1.0. +* In the format `hsl(h, s%, l%)`{:.value} or `hsla(h, s%, l%, a)`{:.value}, where `h` is the hue in degrees (typed without units), `s` and `l` are the saturation and lightness as percentage values from 0 to 100, and `a` is the alpha value from 0.0 to 1.0. **Important**: Note that the declaration of the alpha channel when using the rgba keyword differs from the HTML5 specification. @@ -112,7 +112,7 @@ color: rgb(100%, 0%, 0%); color: rgba(100%, 0%, 0%, 100%); color: rgba(255, 0, 0, 255); color: hsl(0, 100%, 50%); -color: hsl(0, 100%, 50%, 1.0); +color: hsla(0, 100%, 50%, 1.0); ``` #### Resolution