Giter VIP home page Giter VIP logo

a11y-contrast's Introduction

Hello, I'm Darek Kay! ๐Ÿ‘‹

I'm a front-end developer and an accessibility advocate. I love sharing what I know through my blog, teaching and speaking at conferences. If you want to learn more about what I do, look at all the awesome things I'm building to make people's lives better. ๐Ÿ’–

In my free time, I enjoy photography, board games, movies and playing instruments.

Follow me

Latest blog posts ๐Ÿ“–

๐Ÿ‘‰๏ธ View all blog posts

Latest photo ๐Ÿ“ท๏ธ

A small black-white-brown bird in the middle of a yellow colza field.

๐Ÿ‘‰๏ธ View all photos

a11y-contrast's People

Contributors

darekkay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ajstrand

a11y-contrast's Issues

Output all valid color combinations

Currently, a11y-contrast focuses on the magic number principle. For color palettes with no or very high magic numbers, this principle might not be very usable. In such cases, it would be good to see all valid color combinations for a given contrast ratio. Colorable seems to be doing just that, but it would be great to have this functionality built into a11y-contrast.

HSL Support? โœ– color2.luminance is not a function

Does this support HSL? I created a .json file of our SASS variable and running npx a11y-contrast color-palette-3.3.json produces the following:

npx: installed 13 in 1.755s
โ„น Analyzing: color-palette-3.3.json
โœ– color2.luminance is not a function

Example of the file:

{
	"primary": {
		"$primary-100": "hsl(186, 100%, 94%)",
		"$primary-200": "hsl(190, 94%, 88%)",
		"$primary-300": "hsl(196, 92%, 81%)",

EDIT: Maybe this is because these color name don't conform to the grades 0 - 100?

Support custom grade intervals

Currently, the color grade format has to be between 0 and 100 (e.g. white-0, green-10, green-50, green-90, black-100). Some palettes use different grade intervals, e.g.:

A custom grade interval structure should be supported within a11y-contrast to support those use cases. This should be either configurable or automatically detected and applied.

Starting point: https://github.com/darekkay/a11y-contrast/blob/master/src/index.js#L47

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.