Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
286 stars 76 forks source link

Refactor `avatar` to make sure it never fails to generate a valid hex. #6593

Open Elijbet opened 1 year ago

Elijbet commented 1 year ago

Description

private generateFillColor function should never generate an invalid hex

Proposed Advantages

Simplify code to prevent errors in coordinating background and foreground colors, as this is important for validating contrast.

Which Component

avatar

Relevant Info

Stems from https://github.com/Esri/calcite-components/pull/6528 - refer to this comment for specifics in the PR.

jcfranco commented 1 week ago

@Elijbet Is this still applicable?

Elijbet commented 1 week ago

@Elijbet Is this still applicable?

I think the description doesn't provide sufficient context tbh. The contrast issue has been addressed in multiple PRs and has been verified here: https://github.com/Esri/calcite-design-system/issues/6203#issuecomment-1470173704, so I'd just close it.