diff --git a/files/en-us/glossary/rgb/index.md b/files/en-us/glossary/rgb/index.md index c15dc9ee959e6a0..b03ae7c97601591 100644 --- a/files/en-us/glossary/rgb/index.md +++ b/files/en-us/glossary/rgb/index.md @@ -10,11 +10,11 @@ _Red-Green-Blue_ (**RGB**) is a color model that represents colors as mixtures o Alone an RGB value has no meaning. A color model defines how the three components relate to a color space. Graphically, a point in a three-dimensional grid or cube represents a color. Each dimension (or axis) corresponds to a different channel. The RGB color model is then a _cubic_, or _Cartesian_, coordinate system of the underlying color space. -For the web, the underlying color space for an RGB value is _sRGB_ (Standard RGB), and each RGB component is a number between 0 and 255. Float values are supported. +For the web, the underlying color space for an RGB value is _sRGB_ (Standard RGB), and each RGB component is a number between 0 and 255. Note that there are other RGB color spaces, like the _Adobe RGB_ color space, that can represent a wider {{glossary("gamut")}} of color than the _sRGB_ color space. The coordinates in _sRGB_ and _Adobe RGB_ are different. -There are many ways to describe the RGB components of a color. In {{Glossary("CSS")}} they can be represented as a single 24-bit integer in hexadecimal notation (for example, `#add8e6` is light blue), or in functional notation, [`rgb()`](/en-US/docs/Web/CSS/color_value/rgb) as three separate floats between 0 and 255 (for example, `rgb(46 139.5 87)`). In {{Glossary("OpenGL")}}, {{Glossary("WebGL")}}, and {{Glossary("GLSL")}} the red-green-blue components are fractions (floating-point numbers between 0.0 and 1.0), although in the actual color buffer they are typically stored as 8-bit integers. +There are many ways to describe the RGB components of a color. In {{Glossary("CSS")}} they can be represented as a single 24-bit integer in hexadecimal notation (for example, `#add8e6` is light blue), or in functional notation, [`rgb()`](/en-US/docs/Web/CSS/color_value/rgb) as three separate numbers between 0 and 255 (for example, `rgb(46 139.5 87)`). There are also the `srgb`, `srgb-linear`, `a98-rgb`, and `prophoto-rgb` color spaces for the [`color()`](/en-US/docs/Web/CSS/color_value/color) function. RGB is not the only color model that can represent the _sRGB_ color space. Cylindrical coordinate systems like the [`HSL`](/en-US/docs/Web/CSS/color_value/hsl) (_hue-saturation-lightness_) or [`HWB`](/en-US/docs/Web/CSS/color_value/hwb) (_hue-whiteness-blackness_) color models are also used to represent a sRGB color on the web. diff --git a/files/en-us/web/css/color_value/color/index.md b/files/en-us/web/css/color_value/color/index.md index 3a91612c3356913..0a844eb6cd76a9f 100644 --- a/files/en-us/web/css/color_value/color/index.md +++ b/files/en-us/web/css/color_value/color/index.md @@ -28,7 +28,7 @@ Functional notation: `color(colorspace c1 c2 c3[ / A])` - `c1`, `c2`, `c3` - - : {{CSSXref("number")}}, {{CSSXref("percentage")}} values or the keyword `none`, which provide the component values in the color space. + - : {{CSSXref("number")}} between 0 and 1, a {{CSSXref("percentage")}} or the keyword `none`, which provide the component values in the color space. - `A` {{optional_inline}} diff --git a/files/en-us/web/css/color_value/hsl/index.md b/files/en-us/web/css/color_value/hsl/index.md index 8fc7d38533df5a1..11baf1e059141ae 100644 --- a/files/en-us/web/css/color_value/hsl/index.md +++ b/files/en-us/web/css/color_value/hsl/index.md @@ -37,6 +37,8 @@ Functional notation: `hsl(H S L[ / A])` - `A` {{optional_inline}} - : An {{CSSXref("<alpha-value>")}} or the keyword `none`, where the number `1` corresponds to `100%` (full opacity). +> **Note:** This functional notation serializes to sRGB values, and the values of the red, green, blue components may be rounded in serialization. + > **Note:** See [Missing color components](/en-US/docs/Web/CSS/color_value#missing_color_components) for the effect of `none`. ### Formal syntax diff --git a/files/en-us/web/css/color_value/hwb/index.md b/files/en-us/web/css/color_value/hwb/index.md index 39f223dbe9f02a2..fe6037242c71ecc 100644 --- a/files/en-us/web/css/color_value/hwb/index.md +++ b/files/en-us/web/css/color_value/hwb/index.md @@ -7,7 +7,7 @@ browser-compat: css.types.color.hwb {{CSSRef}} -The **`hwb()`** functional notation expresses a given color according to its hue, whiteness, and blackness. An optional alpha component represents the color's transparency. +The **`hwb()`** functional notation expresses an {{glossary("RGB", "sRGB")}} color according to its hue, whiteness, and blackness. An optional alpha component represents the color's transparency. {{EmbedInteractiveExample("pages/css/function-hwb.html")}} @@ -36,6 +36,8 @@ Functional notation: `hwb(H W B[ / A])` - : An {{CSSXref("<alpha-value>")}} or the keyword `none`, where the number `1` corresponds to `100%` (full opacity). +> **Note:** This functional notation serializes to sRGB values, and the values of the red, green, blue components may be rounded in serialization. + > **Note:** See [Missing color components](/en-US/docs/Web/CSS/color_value#missing_color_components) for the effect of `none`. ### Formal syntax diff --git a/files/en-us/web/css/color_value/rgb/index.md b/files/en-us/web/css/color_value/rgb/index.md index f8b7ee2c785b8ab..1abcd022ee10773 100644 --- a/files/en-us/web/css/color_value/rgb/index.md +++ b/files/en-us/web/css/color_value/rgb/index.md @@ -31,6 +31,8 @@ Functional notation: `rgb(R G B[ / A])` - `A` {{optional_inline}} - : An {{CSSXref("<alpha-value>")}} or the keyword `none`, where the number `1` corresponds to `100%` (full opacity). +> **Note:** This functional notation serializes to sRGB values, and the values of the red, green, blue components may be rounded in serialization. + > **Note:** See [Missing color components](/en-US/docs/Web/CSS/color_value#missing_color_components) for the effect of `none`. ### Formal syntax