You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently a bit busy to start working on this but I would like to outline here how should the @adeira/css-colors package evolve for the future 3.0 major version. Basically, the main goal of this release should be to get rid of the [R, G, B] triplet and replace it with some better structure that includes an alpha channel as well.
Public interface changes:
calculateContrastRatio should accept the new structure instead of RGB triplets
isAccessible should accept the new structure instead of RGB triplets
I am currently a bit busy to start working on this but I would like to outline here how should the
@adeira/css-colors
package evolve for the future 3.0 major version. Basically, the main goal of this release should be to get rid of the[R, G, B]
triplet and replace it with some better structure that includes an alpha channel as well.Public interface changes:
calculateContrastRatio
should accept the new structure instead of RGB tripletsisAccessible
should accept the new structure instead of RGB tripletschooseHigherContrast
should accept the new structure instead of RGB triplets (also please note this comment: Colors: add new functionchooseHigherContrast
#2741 (review))isDark
(e7f1673)isBright
(e7f1673)convertToRGBTriplet
(doesn't make sense anymore with the new structure)Unchanged functions:
cssColorNames
,isColor
,normalizeColor
,hex3ToHex6
,hex6ToHex3
Inspiration: https://github.com/d3/d3-color
The text was updated successfully, but these errors were encountered: