patternfly / patternfly-design

Use this repo to file all new feature or design change requests for the PatternFly project
115 stars 105 forks source link

Colors - PF colors for severity levels #1219

Closed jamestalton closed 3 months ago

jamestalton commented 1 year ago

Several products need colors to indicate severity levels. Instead of the products each defining these separately PF should provide those colors. That way that can be used for icons, text, and charts consistently. In addition, PF can adjust the colors for the PF dark theme.

Different use cases might have a different number of severity levels, usually 3, 4 or 5.

Examples: Lowest, Low, MediumLow, Medium, MediumHigh, High, Highest, Critical

mcoker commented 1 year ago

To add to this, I think we should consider all of the types of states we want to be able to support and theme, as well as simple uses of colors that may overlap with states. For example, for "red" things, we have:

These may all be the same red, but should they have separate tokens that can be customized, and inherit intentionally? For example - this is just an example of that type of customization/inheritance, and is likely wildly inaccurate for how we would want it to end up behaving:

This produces:

This goes for all statuses potentially

Also I think it would be great to get away from using literal color names as the multi-color variation name for things like labels - ie, change "red," "blue," "green," etc to "multi-color-100," "multi-color-200," "multi-color-300". That way we can make updates to those palettes and they aren't tied to literal color names. This is essential for theming, and also allows us to define them in a logical order in which they can be used. In charts, we have both palette color scale vars/tokens and multi-color scale vars/tokens (also unordered multi-color)

mcarrano commented 1 year ago

@mcoker @mceledonia Should we be considering this as part of our global variable refresh?

andrew-ronaldson commented 10 months ago

@smckinno is picking this up. Wanted to share the progress with a link to the Sketch file

Screenshot 2023-08-22 at 10 42 44 AM

I started testing a wider range of severities but the colour accessibility plays a factor in these decisions.

smckinno commented 8 months ago

@andrew-ronaldson Wrapping up this effort - Here is the documentation and the Sketch Link. Feel free to check it out! Sketch Link: https://www.sketch.com/s/6cd8d222-b3cd-461d-b15d-d1d4ee331b48 Documentation: https://docs.google.com/document/d/1-4ocLt9Ijcu5amiX7u_U6au17N4wCqDTYGh8ZiPu7mQ/edit?usp=sharing