mui / mui/material-ui

[joy-ui] Adopt HSL instead of RGB/hex color codes

Open
#36,684 5 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

customization: theme package: joy-ui scope: all components type: new feature waiting for 👍
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Duplicates
  • I have searched the existing issues
Latest version
  • I have tested the latest version
Summary 💡

No response

Examples 🌈

No response

Motivation 🔦

Currently all colors get generated as hex codes.

    --joy-palette-primary-50: #F4FAFF;
    --joy-palette-primary-100: #DDF1FF;
    --joy-palette-primary-200: #ADDBFF;
    --joy-palette-primary-300: #6FB6FF;
    --joy-palette-primary-400: #3990FF;
    --joy-palette-primary-500: #096BDE;
    --joy-palette-primary-600: #054DA7;
    --joy-palette-primary-700: #02367D;
    --joy-palette-primary-800: #072859;
    --joy-palette-primary-900: #00153C;

Would suggest the team to generate them as human readable HSL code instead,

    --joy-palette-primary-50: hsl(207, 100%, 98%);
    --joy-palette-primary-100: hsl(205, 100%, 93%);
    ...

Reasons:

  1. Better understanding of color when changing hsl values.
  2. Changing a hue, saturation or lightness of a color is useful in certain situations.
  3. Easy adoption to new color palettes from existing color palettes just be changing hue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Joy UI code that generates palette color variables and inspect how the current hex values are produced. The issue is complete when generated palette variables use human-readable HSL values consistently, with the existing palette colors preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
design, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.