ibm-products icon indicating copy to clipboard operation
ibm-products copied to clipboard

Color of exclamation mark in the status icon gets lighter as the size decreases

Open fbarroso24 opened this issue 2 years ago • 1 comments

Title line template: [Title]:

Color of exclamation mark in the status icon gets lighter as the size decreases image

What package(s) are you using?

"@carbon/ibm-products": "1.13.0"

  • [ ] Carbon for IBM Products (or Carbon for IBM Cloud & Cognitive)
  • [ ] Legacy/CDAI
  • [ ] Legacy/Security

Detailed description

Describe in detail the issue you're having. Regarding the Status Icon component, the color of the exclamation mark gets lighter as the size of the icon gets smaller. This behavior is also observed in the story book. See 1st screenshot of the progression from sm->md->lg->xlg . image

The spec (2nd screenshot) says the light and dark themes for the major-warning icon should be the same regardless of light or dark theme but doesn't mention anything about the exclamation point progressively getting darker.
image

       <StatusIcon
	        iconDescription='low score'
	        kind='major-warning'
	        size='sm'
	        theme='light'
        />

Is this issue related to a specific component? Yes the StatusIcon component

What did you expect to happen? What happened instead? What would you like to see changed?

What browser are you working in? Chrome 100.0.4896.88

What version of the @carbon/ibm-products (or @carbon/ibm-cloud-cognitive) package are you using? "@carbon/ibm-products": "1.13.0"

What offering/product do you work on? Any pressing ship or release dates we should be aware of? OpenPages

Steps to reproduce the issue

It is reproducible on the storybook online https://carbon-for-ibm-products.netlify.app/?path=/story/ibm-products-patterns-status-icons-statusicon--default&args=kind:major-warning

Additional information

  • Screenshots or code
  • Notes

fbarroso24 avatar Apr 13 '22 15:04 fbarroso24

@AlexanderMelox any updates on this one? Thanks in advance!

fbarroso24 avatar Jul 13 '22 15:07 fbarroso24

The source of the problem is not that the assigned colors are changing as the icon gets smaller.

The problem is the browser’s rendering engine. To provide smoother, cleaner graphics, the browser uses anti-aliasing to “smooth” adjacent pixels to reduce “jagged edges”.

image

As an example, I enlarged your screenshot. Notice how, as the icon gets smaller and smaller, the rendering doesn’t just “smooth” the shape of the exclamation point, but also the difference between the orange and black colors.

Anti-aliasing is a great feature for producing smoother images and icons, but the penalty is that small details will lose both definition and color.

This is something that cannot be fixed by web developers.

image

paul-balchin-ibm avatar Jan 10 '24 16:01 paul-balchin-ibm