Skip to content

Conversation

OnkarRuikar
Copy link
Contributor

@OnkarRuikar OnkarRuikar commented Aug 31, 2025

Description

Add the existing tool to the tools infrastructure: left sidebar and navbar

Motivation

The tool is similar to the other listed CSS tools: https://github.com/mdn/css-examples/tree/main/tools. Hosted in the same place. We need to list it along with other tools.

Related issues and pull requests

@OnkarRuikar OnkarRuikar requested review from a team as code owners August 31, 2025 06:38
@OnkarRuikar OnkarRuikar requested review from estelle and dipikabh and removed request for a team August 31, 2025 06:38
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed labels Aug 31, 2025
Copy link
Contributor

github-actions bot commented Aug 31, 2025

Preview URLs (9 pages)
Flaws (8)

Note! 5 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/CSS/color_value/rgb
Title: rgb()
Flaw count: 2

  • macros:
    • Macro produces link /en-US/docs/Learn_web_development/Core/Styling_basics/Fundamental_CSS_comprehension which is a redirect
    • Macro produces link /en-US/docs/Learn_web_development/Core/Styling_basics/Fancy_letterheaded_paper which is a redirect

URL: /en-US/docs/Web/CSS/CSS_colors
Title: CSS colors
Flaw count: 2

  • macros:
    • Macro produces link /en-US/docs/Learn_web_development/Core/Styling_basics/Fundamental_CSS_comprehension which is a redirect
    • Macro produces link /en-US/docs/Learn_web_development/Core/Styling_basics/Fancy_letterheaded_paper which is a redirect

URL: /en-US/docs/Web/CSS/CSS_colors/Color_picker
Title: Color picker
Flaw count: 2

  • macros:
    • Macro produces link /en-US/docs/Learn_web_development/Core/Styling_basics/Fundamental_CSS_comprehension which is a redirect
    • Macro produces link /en-US/docs/Learn_web_development/Core/Styling_basics/Fancy_letterheaded_paper which is a redirect

URL: /en-US/docs/Web/CSS/CSS_colors/Color_values
Title: CSS color values
Flaw count: 2

  • macros:
    • Macro produces link /en-US/docs/Learn_web_development/Core/Styling_basics/Fundamental_CSS_comprehension which is a redirect
    • Macro produces link /en-US/docs/Learn_web_development/Core/Styling_basics/Fancy_letterheaded_paper which is a redirect

(comment last updated: 2025-09-16 02:30:01)

@OnkarRuikar OnkarRuikar requested a review from a team as a code owner September 1, 2025 03:49
@github-actions github-actions bot added system [PR only] Infrastructure and configuration for the project size/m [PR only] 51-500 LoC changed and removed size/s [PR only] 6-50 LoC changed labels Sep 1, 2025
@OnkarRuikar
Copy link
Contributor Author

All good points! I've addressed them. Two issues to address:

  1. Should we call it Color mixer tool like the existing Color picker tool or call it Color mixer like Shape generator? Should we remove 'tool' word from Color picker tool as well?
  2. @LeoMcA and @bsmth The pickr.es5.min.js works in local dev with Fred. Will it work on live Fred server, or should I host the file in shared assets repo? At the moment it is not working in PR preview.

@estelle
Copy link
Member

estelle commented Sep 1, 2025

1. Should we call it `Color mixer tool` like the existing `Color picker tool` or call it `Color mixer` like `Shape generator`? Should we remove 'tool' word from `Color picker tool` as well?
  1. Let's remove the "tool" in "color picker tool".
  2. Should we put the tools in alphabetical order in the left nav?
  3. The color mixer should output the color in a few formats: the color-mix(in <color-space>, <color> <percent>, <colot> <percent>) format, and the output CSS color space itself if valid, such as #AAAAAA00 and rgb(123, 123, 123 / 0), etc., if srgb color space. That function can be pulled from the color picker.

@OnkarRuikar OnkarRuikar requested a review from a team as a code owner September 2, 2025 02:41
@github-actions github-actions bot added the Content:Learn Learning area docs label Sep 2, 2025
@OnkarRuikar
Copy link
Contributor Author

Let's remove the "tool" in "color picker tool".

Done. Also updated slug and content references.

Should we put the tools in alphabetical order in the left nav?

Done. Also prposed updates in top navigation

The color mixer should output the color in a few formats: the color-mix(in , , ) format, and the output CSS color space itself if valid, such as #AAAAAA00 and rgb(123, 123, 123 / 0), etc., if srgb color space. That function can be pulled from the color picker.

This would require a third party library like Color.js and Chroma.js. Let's get the tool in first and then do enhancements in followup PRs.

@OnkarRuikar OnkarRuikar requested a review from estelle September 2, 2025 02:50
@sideshowbarker sideshowbarker removed the request for review from a team September 2, 2025 05:27
@estelle
Copy link
Member

estelle commented Sep 2, 2025

The color mixer should output the color in a few formats: the color-mix(in , , ) format, and the output CSS color space itself if valid, such as #AAAAAA00 and rgb(123, 123, 123 / 0), etc., if srgb color space. That function can be pulled from the color picker.

This would require a third party library like Color.js and Chroma.js. Let's get the tool in first and then do enhancements in followup PRs.

I hand wrote the code for the color picker. In other words, it isn't too complex ;)
see https://github.com/mdn/css-examples/blob/main/modules/colors.html
Most color formats are srgb, so most are covered by that code.

Edit: I guess the issue is, as a tool, what is the output that people can use in their code? It's cool to see what the color value creates, but it's an "example" rather than a "tool" if there's nothing they can grab to use elsewhere.

@OnkarRuikar OnkarRuikar marked this pull request as draft September 3, 2025 03:57
Copy link
Contributor

github-actions bot commented Sep 4, 2025

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added size/l [PR only] 501-1000 LoC changed and removed merge conflicts 🚧 [PR only] size/m [PR only] 51-500 LoC changed labels Sep 14, 2025
@OnkarRuikar
Copy link
Contributor Author

OnkarRuikar commented Sep 14, 2025

Edit: I guess the issue is, as a tool, what is the output that people can use in their code? It's cool to see what the color value creates, but it's an "example" rather than a "tool" if there's nothing they can grab to use elsewhere.

@estelle I see. Now the the output is shown in various color spaces and it is easily grabbable ✊

1

@OnkarRuikar OnkarRuikar marked this pull request as ready for review September 14, 2025 08:02
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking really good.

I suggested some edits.

@OnkarRuikar OnkarRuikar requested a review from estelle September 16, 2025 02:31
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay! 🎉

@estelle estelle merged commit c148812 into mdn:main Sep 16, 2025
10 checks passed
@OnkarRuikar OnkarRuikar deleted the css_tools branch September 16, 2025 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs Content:Learn Learning area docs size/l [PR only] 501-1000 LoC changed system [PR only] Infrastructure and configuration for the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants