6.12.126 • Published 2 years ago

@womorg/aperiam-ullam-accusamus v6.12.126

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

A11y Contrast

npm Build license

A CLI utility to calculate/verify accessible magic numbers for a color palette. Read my blog post for some more information.

npm.io

Installation

This tool requires Node.js version 18+.

Install globally:

$ npm install -g @womorg/aperiam-ullam-accusamus  # Npm
$ yarn add -g @womorg/aperiam-ullam-accusamus     # Yarn

Or install as a local dependency:

$ npm install --save @womorg/aperiam-ullam-accusamus  # Npm
$ yarn add @womorg/aperiam-ullam-accusamus            # Yarn

Or use without installing:

$ npx @womorg/aperiam-ullam-accusamus <file>

Usage

View program help:

$ @womorg/aperiam-ullam-accusamus --help
Usage: @womorg/aperiam-ullam-accusamus <file> [options]

Arguments:
  <file>  Color palette file                              [required] [file]

Options:
  --min-ratio-3    Verify magic number for ratio 3                 [number]
  --min-ratio-4.5  Verify magic number for ratio 4.5               [number]
  --min-ratio-7    Verify magic number for ratio 7                 [number]
  -h, --help       Show help                     [commands: help] [boolean]
  -v, --version    Show version number        [commands: version] [boolean]

Run a full report for a color palette file:

$ @womorg/aperiam-ullam-accusamus <file>

Verify that the color palette fulfills certain magic numbers per contrast ratio:

$ @womorg/aperiam-ullam-accusamus <file> --min-ratio-3=40 --min-ratio-4.5=50 --min-ratio-7=70

Color palette format

This tool handles flat or nested JSON files. Any consistent grading system is supported.

  • Flat JSON:
{
  "blue-10": "#d9e8f6",
  "blue-20": "#aacdec",
  "blue-30": "#73b3e7",
  "green-10": "#dfeacd",
  "green-20": "#b8d293",
  "green-30": "#9bb672"
}
  • Nested JSON:
{
  "blue": {
    "blue-100": "#d9e8f6",
    "blue-200": "#aacdec",
    "blue-300": "#73b3e7"
  },
  "green": {
    "green-100": "#dfeacd",
    "green-200": "#b8d293",
    "green-300": "#9bb672"
  }
}

Check out some example color palettes under /examples.

License

This project and its contents are open source under the MIT license.

syntaxkeysspinnersprototypeECMAScript 2018deepSymbol.toStringTagawslockfileprotoschemetypedinterruptsglobcacherateform-validationjavascriptoffsetes7clicloudsearchbuffersoperating-systemtrimEndObject.getPrototypeOfgenericspackage managermoduleestreewatchFileJSONregexnegative zerotesterbytereuseformspasswordparserlooklesscssprunefindmetadataless cssasciiObject.valuessymlinkdom-testing-librarydefinerecursiveoptimizeres-shimsclass-validatorlessrouteisConcatSpreadableastec2workspace:*formmake dirtypegetterassertsES2018ES2020fileES5jsontakenamesArray.prototype.flatvaluecompilerfast-deep-clonemodulesWeakSetlinuxbannerflatMapsyntaxerrordayjscssObject.entriesnegativecallboundnpmparentsphonesharedarraybufferES2019fixed-widthhardlinkscodesboundmochaglacierStreamstc39String.prototype.trimURLmapclassnamesexpressionslotfindupwindowsrouterautoscalingismergeidleeventshotfastifybreakjsdomArray.prototype.findLastIndexstreamssuperstructminimalescapemomentweakmapparsingwarningviewcss-in-js_.extendargsdeep-clonequerybundlerreact-hook-formurlfullwidthlimitedchinesetermbyteOffsetsidecloudwatchreduxutilitybddebsnodejsnumberemrArraydeletecommanderpnpm9groupByinBigInt64ArrayelectrontestingrapidloggingFloat64ArrayrmFloat32ArraycallbindsafeECMAScript 2023reducerl10nelmdebugbrowserruntimeartRegExp.prototype.flagssescolourarraysstylingObject.fromEntriescss nestingstringifyTypeBoxappjapanesesequencewatchECMAScript 2017mobilesigintexpresscoercibleperformancerfc4122JSON-SchemasetImmediateECMAScript 2015envwgetdiff__proto__private datavestquote
6.12.126

2 years ago

5.10.108

2 years ago

5.10.107

2 years ago

6.12.119

2 years ago

5.10.106

2 years ago

5.10.105

2 years ago

6.12.117

2 years ago

6.12.118

2 years ago

5.12.116

2 years ago

6.12.116

2 years ago

5.10.109

2 years ago

6.12.124

2 years ago

5.10.111

2 years ago

6.12.125

2 years ago

5.10.110

2 years ago

6.12.122

2 years ago

6.12.123

2 years ago

6.12.120

2 years ago

5.10.115

2 years ago

6.12.121

2 years ago

5.10.114

2 years ago

5.10.113

2 years ago

5.10.112

2 years ago

5.11.116

2 years ago

5.11.115

2 years ago

5.10.104

2 years ago

5.10.103

2 years ago

5.10.102

2 years ago

5.10.99

2 years ago

5.10.100

2 years ago

5.10.101

2 years ago

5.10.98

2 years ago

5.10.97

2 years ago

5.10.96

2 years ago

5.10.95

2 years ago

5.10.92

2 years ago

5.10.91

2 years ago

5.10.94

2 years ago

5.10.93

2 years ago

5.10.89

2 years ago

5.10.88

2 years ago

5.10.90

2 years ago

5.10.87

2 years ago

5.10.86

2 years ago

5.10.85

2 years ago

5.10.84

2 years ago

5.10.81

2 years ago

5.10.80

2 years ago

5.10.83

2 years ago

5.10.82

2 years ago

5.10.79

2 years ago

5.10.78

2 years ago

5.8.78

2 years ago

5.9.78

2 years ago

5.8.75

2 years ago

5.8.76

2 years ago

5.8.77

2 years ago

5.8.74

2 years ago

5.8.73

2 years ago

5.7.73

2 years ago

4.6.71

2 years ago

4.6.72

2 years ago

5.6.73

2 years ago

5.6.72

2 years ago

3.5.58

2 years ago

3.5.57

2 years ago

3.4.48

2 years ago

3.5.56

2 years ago

3.4.49

2 years ago

3.5.55

2 years ago

3.5.54

2 years ago

3.5.53

2 years ago

3.5.52

2 years ago

3.6.63

2 years ago

3.5.51

2 years ago

3.5.59

2 years ago

3.6.62

2 years ago

3.5.50

2 years ago

3.3.46

2 years ago

3.3.47

2 years ago

3.3.48

2 years ago

3.5.62

2 years ago

4.6.70

2 years ago

3.3.41

2 years ago

3.3.42

2 years ago

3.3.43

2 years ago

3.3.44

2 years ago

3.3.45

2 years ago

3.5.61

2 years ago

3.5.60

2 years ago

4.6.63

2 years ago

4.6.66

2 years ago

2.2.39

2 years ago

4.6.67

2 years ago

4.6.64

2 years ago

4.6.65

2 years ago

2.2.38

2 years ago

4.6.68

2 years ago

4.6.69

2 years ago

2.3.41

2 years ago

2.3.40

2 years ago

3.5.49

2 years ago

2.2.40

2 years ago

2.2.37

2 years ago

2.2.35

2 years ago

2.2.36

2 years ago

2.2.33

2 years ago

2.2.34

2 years ago

2.2.31

2 years ago

2.2.32

2 years ago

2.2.30

2 years ago

2.1.27

2 years ago

2.1.28

2 years ago

2.1.25

2 years ago

2.1.26

2 years ago

2.1.24

2 years ago

2.1.29

2 years ago

2.2.29

2 years ago

1.1.23

2 years ago

1.1.22

2 years ago

1.1.21

2 years ago

1.1.20

2 years ago

1.1.24

2 years ago

1.1.19

2 years ago

1.1.18

2 years ago

1.1.17

2 years ago

1.1.16

2 years ago

1.0.15

2 years ago

1.1.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago