Giter Club home page Giter Club logo

datavizcontrast's Introduction

Dataviz contrast

Size matters. Small elements need higher contrast than large elements.

This is the code for the tool at https://datavizcontrast.com/. Choose two colours to get the APCA lightness contrast, and see the minimum pixel size for shapes such as lines and bars.

About this tool

Choose two colours to get the APCA lightness contrast, and see the minimum pixel size for shapes such as lines and bars.

The circles in the background demonstrate the smallest possible px sizes.

What is APCA?

The Advanced Perceptual Contrast Algorithm APCA is a method used to determine the readability of text and graphics. APCA takes human perception into account and corrects some of the faults in the current WCAG 2 contrast algorithm.

APCA measures lightness contrast as a value from Lc 0 (no contrast) to Lc 106 (maximum contrast). The contrast requirements on this page are extracted from the Non-Text Minimums table (image)](Myndex/SAPC-APCA#39) from Myndex, marked "Preliminary – Feb 2, 2022".

APCA might be included in WCAG 3, but is still in development and subject to changes.

The page was built using APCA-3, colorParsley, Name that Color, Chroma.js, Svelte, and WARP.

To run locally

Install: npm install

Run dev: npm run dev

Build to the /dist folder: npm run build

NB: the files in /dist will probably not run locally as they need to be at the root directory. For hosting, uploaded to https://www.proisp.no/controlpanel/.

History

Set up with Vite and Svelte: npm create vite@latest vite-svelte --template svelte

And Warp: npm install unocss @warp-ds/uno @warp-ds/css

This was originally a repo for WARP tokens, but removed all the token stuff for this repo.

datavizcontrast's People

Contributors

jonolave avatar

Watchers

 avatar

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.