Skip to content

Commit a6d1fd3

Browse files
Enhance color picker tool and remove GHLiveSample macro (#41158)
* Enhance color picker tool and remove GHLiveSample macro * Apply suggestions from code review Co-authored-by: Dipika Bhattacharya <[email protected]> * address review comments * Apply suggestions from code review Co-authored-by: Dipika Bhattacharya <[email protected]> * address review comments * correct colorspace name casings * Apply suggestions from code review Co-authored-by: Dipika Bhattacharya <[email protected]> * review comments * align inputs * better formatting * rename to color_format_converter * remove text to avoid repitition --------- Co-authored-by: Dipika Bhattacharya <[email protected]>
1 parent 0ea88f7 commit a6d1fd3

File tree

23 files changed

+717
-124
lines changed

23 files changed

+717
-124
lines changed

files/en-us/_redirects.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12252,7 +12252,8 @@
1225212252
/en-US/docs/Web/CSS/CSS_cascade/specified_value /en-US/docs/Web/CSS/CSS_cascade/Value_processing#specified_value
1225312253
/en-US/docs/Web/CSS/CSS_cascade/used_value /en-US/docs/Web/CSS/CSS_cascade/Value_processing#used_value
1225412254
/en-US/docs/Web/CSS/CSS_charsets /en-US/docs/Web/CSS/CSS_syntax
12255-
/en-US/docs/Web/CSS/CSS_colors/Color_picker_tool /en-US/docs/Web/CSS/CSS_colors/Color_picker
12255+
/en-US/docs/Web/CSS/CSS_colors/Color_picker /en-US/docs/Web/CSS/CSS_colors/Color_format_converter
12256+
/en-US/docs/Web/CSS/CSS_colors/Color_picker_tool /en-US/docs/Web/CSS/CSS_colors/Color_format_converter
1225612257
/en-US/docs/Web/CSS/CSS_container_queries /en-US/docs/Web/CSS/CSS_containment/Container_queries
1225712258
/en-US/docs/Web/CSS/CSS_descriptor_definition /en-US/docs/Web/CSS
1225812259
/en-US/docs/Web/CSS/CSS_display/flow_layout/Block_and_inline_layout_in_normal_flow /en-US/docs/Web/CSS/CSS_display/Block_and_inline_layout_in_normal_flow
@@ -12331,7 +12332,7 @@
1233112332
/en-US/docs/Web/CSS/Tools/Border-image_generator /en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Border-image_generator
1233212333
/en-US/docs/Web/CSS/Tools/Border-radius_generator /en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Border-radius_generator
1233312334
/en-US/docs/Web/CSS/Tools/Box-shadow_generator /en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Box-shadow_generator
12334-
/en-US/docs/Web/CSS/Tools/ColorPicker_Tool /en-US/docs/Web/CSS/CSS_colors/Color_picker
12335+
/en-US/docs/Web/CSS/Tools/ColorPicker_Tool /en-US/docs/Web/CSS/CSS_colors/Color_format_converter
1233512336
/en-US/docs/Web/CSS/Understanding_CSS_z-index /en-US/docs/Web/CSS/CSS_positioned_layout/Understanding_z-index
1233612337
/en-US/docs/Web/CSS/Understanding_CSS_z-index/Adding_z-index /en-US/docs/Web/CSS/CSS_positioned_layout/Using_z-index
1233712338
/en-US/docs/Web/CSS/Understanding_CSS_z-index/Stacking_and_float /en-US/docs/Web/CSS/CSS_positioned_layout/Stacking_floating_elements

files/en-us/_wikihistory.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75899,7 +75899,7 @@
7589975899
"chrisdavidmills"
7590075900
]
7590175901
},
75902-
"Web/CSS/CSS_colors/Color_picker": {
75902+
"Web/CSS/CSS_colors/Color_format_converter": {
7590375903
"modified": "2020-10-30T22:49:32.596Z",
7590475904
"contributors": [
7590575905
"td2014",

files/en-us/glossary/color_space/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ CIELab color functions include {{CSSXref("color_value/lab", "lab()")}} (lightnes
6161
> [!NOTE]
6262
> The hue and lightness in `lch()` and `oklch` are different from the same-named values in {{cssxref("color_value/hsl", "hsl()")}} or other sRGB color spaces.
6363
64-
CIELab color spaces, including Lab, Lch, Oklab, and Oklch, are device-independent color spaces.
64+
CIELab color spaces, including Lab, LCH, Oklab, and OkLCh, are device-independent color spaces.
6565

6666
- `lab-d50` color space
6767
- : Expresses color as `L` in a range from `0` to `100`, and `a` and `b` with a range from `-125` to `125`. The `a` and `b` axes are not bound by these range values, which are references in defining percentage inputs and outputs in relation to the `Display P3` color space. The whitepoint is D50.
Loading

files/en-us/learn_web_development/getting_started/your_first_website/what_will_your_website_look_like/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ At this point, it's good to start putting together the content that will eventua
6161

6262
Let's choose a background color for your page.
6363

64-
1. Go to [the Color Picker](/en-US/docs/Web/CSS/CSS_colors/Color_picker) and find a color you like.
65-
2. When you click on a color, you'll see a strange six-character code like `#660066`. That's called a _hex code_ (short for hexadecimal), and represents your color. Copy the code down somewhere safe for now.
64+
1. Go to [the Color Picker](/en-US/docs/Web/CSS/CSS_colors/Color_format_converter) and find a color you like.
65+
2. When you pick a color, you'll see a strange six-character code like `#660066`. That's called a _hex code_ (short for hexadecimal), and represents your color. Copy the code down somewhere safe for now.
6666

67-
![Color-Picker-Tool on MDN Docs website with RGB, HSL, and HEX colors ](color-picker.png)
67+
![Color format converter tool on MDN Docs website](color_format_converter.jpg)
6868

6969
## Choosing an image
7070

files/en-us/web/accessibility/guides/colors_and_luminance/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Currently, the {{glossary("RGB", "RGB color space")}} predominates as the space
4040

4141
## The sRGB color space
4242

43-
Color has many ways of being defined, as is apparent in the [`<color>` data type](/en-US/docs/Web/CSS/color_value), including RGB, RGB decimal, RGB percent, HSL, HWB, LCH, LAB, and CMYK, among others.
43+
Color has many ways of being defined, as is apparent in the [`<color>` data type](/en-US/docs/Web/CSS/color_value), including RGB, RGB decimal, RGB percent, HSL, HWB, LCH, Lab, and CMYK, among others.
4444

4545
For digital concerns, much of the technology has historically resided in the RGB color space. The RGB color model is extended to include "alpha" — RGBA — to allow specification of the opacity of a color. Other methods for measuring color involve measurements using other color spaces and are supported in modern displays and browsers. Still, color measurements in the RGB color space predominate, including in video production.
4646

@@ -82,7 +82,7 @@ color: hsl(300deg 100% 50% / 100%);
8282
color: hwb(300deg 0% 0%);
8383
color: hwb(300 0% 0% / 1);
8484

85-
/* by LAB representation of the sRGB value */
85+
/* by Lab representation of the sRGB value */
8686
color: lab(60 93.56 -60.5);
8787
color: lab(60 93.56 -60.5 / 1);
8888

files/en-us/web/css/color-interpolation-method/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ The following example shows the effect of using different interpolation color sp
8383
The following example shows how to specify a color space when interpolating colors in repeating gradients.
8484
Three boxes show different types of repeating gradients using the [`repeating-conic-gradient()`](/en-US/docs/Web/CSS/gradient/repeating-conic-gradient), [`repeating-linear-gradient()`](/en-US/docs/Web/CSS/gradient/repeating-linear-gradient), and [`repeating-radial-gradient()`](/en-US/docs/Web/CSS/gradient/repeating-radial-gradient) functions.
8585
The first box uses the Lab color space to interpolate between two color values.
86-
The second and third boxes use Oklch and additionally provide a [`<hue-interpolation-method>`](/en-US/docs/Web/CSS/hue-interpolation-method) to specify how to interpolate between hue values.
86+
The second and third boxes use OkLCh and additionally provide a [`<hue-interpolation-method>`](/en-US/docs/Web/CSS/hue-interpolation-method) to specify how to interpolate between hue values.
8787

8888
#### HTML
8989

files/en-us/web/css/color_value/color-mix/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Choosing the correct color space is important for producing desired results. Giv
1212

1313
- If the result of physically mixing two colored lights is desired, the CIE XYZ or srgb-linear color space is appropriate, because they are linear in light intensity.
1414
- If colors need to be evenly spaced perceptually (such as in a gradient), the Oklab color space (and the older Lab) are appropriate, because they are designed to be perceptually uniform.
15-
- If avoiding graying out in color mixing is desired, i.e., maximizing chroma throughout the transition, Oklch (and the older LCH) work well.
15+
- If avoiding graying out in color mixing is desired, i.e., maximizing chroma throughout the transition, OkLCh (and the older LCH) work well.
1616
- Only use sRGB if you need to match the behavior of a specific device or software that uses sRGB. The sRGB color space is neither linear-light nor perceptually uniform, and produces poorer results such as overly dark or grayish mixes.
1717

1818
## Syntax

files/en-us/web/css/color_value/color/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ The output is as follows:
383383
- {{CSSXref("color")}} property
384384
- [The `<color>` data type](/en-US/docs/Web/CSS/color_value) for a list of all color notations
385385
- [Using relative colors](/en-US/docs/Web/CSS/CSS_colors/Relative_colors)
386-
- [sRGB color picker and conversion tool](/en-US/docs/Web/CSS/CSS_colors/Color_picker)
386+
- [Color_format_converter tool](/en-US/docs/Web/CSS/CSS_colors/Color_format_converter)
387387
- [CSS colors](/en-US/docs/Web/CSS/CSS_colors) module
388388
- [`color-gamut`](/en-US/docs/Web/CSS/@media/color-gamut) media feature
389389
- [Wide Gamut Color in CSS with Display-p3](https://webkit.org/blog/10042/wide-gamut-color-in-css-with-display-p3/)

0 commit comments

Comments
 (0)