package discovery: gray-percentage

2020-01-07

 | 

~1 min read

 | 

122 words

Today in package discoveries:1 gray-percentage.

It’s a small utility written by Kyle Matthews (creator of Gatsby) that returns a hue of gray (with an optional mixin for a color).

Kyle used this in Typography.JS, a quick theming library, which is how I found it. However, gray-percentage is more generally useful to find alternatives to black (#000) (https://ianstormtaylor.com/design-tip-never-use-black/).

Looking at the code, it also reminded me of the complementary color generator I published last year. The goal of that package was to use color theory to create complementary colors for use in data visualization (somewhat similar to a site like coolors.co).

Footnotes

  • 1 I can see this being an ongoing series of loosely related posts. This is the first one though.

Hi there and thanks for reading! My name's Stephen. I live in Chicago with my wife, Kate, and dog, Finn. Want more? See about and get in touch!