1.10.115 • Published 2 years ago

@devtea2026/ratione-numquam-itaque-soluta v1.10.115

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 @devtea2026/ratione-numquam-itaque-soluta  # Npm
$ yarn add -g @devtea2026/ratione-numquam-itaque-soluta     # Yarn

Or install as a local dependency:

$ npm install --save @devtea2026/ratione-numquam-itaque-soluta  # Npm
$ yarn add @devtea2026/ratione-numquam-itaque-soluta            # Yarn

Or use without installing:

$ npx @devtea2026/ratione-numquam-itaque-soluta <file>

Usage

View program help:

$ @devtea2026/ratione-numquam-itaque-soluta --help
Usage: @devtea2026/ratione-numquam-itaque-soluta <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:

$ @devtea2026/ratione-numquam-itaque-soluta <file>

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

$ @devtea2026/ratione-numquam-itaque-soluta <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.

es5es-abstractes2017beanstalkjestloggingObjectdom-testing-librarypromisesgradients cssamazonbreaktypanionregexpencryptionECMAScript 3installerunicodecommanderregular expressionsnumberrequestTypedArrayredactcallbindbuffercryptonegativegradients css3objlaunchRxcolourautoprefixerstreamHyBiuuidnodejsconsumeutilitysyntaxes6cloudfrontWeakMapdependenciestouchObject.isxdg-openArraybddmkdirfilteropenercloudsearchReactiveXECMAScript 6macosimmutableinternal slotansiflags__proto__arraybufferrfc4122ECMAScript 2020nameregular expressionstreamsestreeformwritablepluginTypeScriptvaluestypescripttestfast-deep-copyexecquerygetPrototypeOfchannelSetjoiecmascriptSymbolguiddefinesignalECMAScript 2021fullwidthlazycloudwatchasserttraversevalidationfindlookdatedataviewnopeloadingdeterministiccontainstapeArray.prototype.findLastIndexstartercrypttslibarktypeWebSocketsBigUint64ArraycolumnresolvelintoptimistfsargumentsES2020ES5hasOwnzeroeslesscsssuperstructsetPrototypeOfendpointprotocol-bufferseslint-pluginschemeiamutil.inspectObject.entriesrapidconnectcachesortcss nestingvariablesArray.prototype.filterreplayES2022PromisedeepcloneoptionsigintCSSstateidcheckStreamstestingchromedomES2021vpcFunction.prototype.namesearchiterationparentmonorepothroateast-asian-widthrangeerrorgroupelbs3groupBybytebrowserslistdescriptorArray.prototype.flatMapsortedES2023formsstructuredClonewarningchaisetImmediatetrimsetterlockfileassertssharedarraybuffernameswaitpatchboundextensionexecutableindicatorthrottleES2019buffersassignslicecss lesssafeloadbalancingflatURLdebuglinkkinesisreact-testing-librarymobileconsolehashlogargparseoperating-systemdatastructureeverywafchineseeditorl10npropnegative zerostyleguidehttpisruntimejsdifffind-upieObject.valuesreadableemitdebuggertsstylesfastclone256schemaworkflownested cssrateequalnodegdprtrimStartidentifiersimportstyleJSON-SchemacircularshebanggetpersistentES2017symlinksObservablesUint16ArraydotenvjwttimeJSONinvariantfromgetterTypeBoxtelephonesetfast-copyexpressglacierdefaultcjk@@toStringTagdataViewpushyamlnative0styled-componentsstatusqueueMicrotaskmake dirscheme-validationexpressioniteratordeep-copyparsingstringifyglobalsformattingpicomatchdescriptorsmomentObject.getPrototypeOfclassnameprettywebbcryptredux-toolkitreduxbusyserializefastcopyextenddirsnslesscorsWeakSetclassnamesownspecmulti-packagecloudtrailmetadatatesterpositivecallappcorecharactertc39libphonenumberreuseargvprivateforEachwatcherdiffspawndefinePropertyrobustpruneassertionbrowserlistinstallmime-dbchildfile systemlimitcollectionexeprivate datareadpreprocessorformatsqsescapeio-tsclass-validatoroffsetseslastaccessorInt32ArrayfolderES6validwhichperformancemodulesless csscss variableArray.prototype.containsrmwhatwgpredictablees2018helperserror-handlingshrinkwrapsimpledbopenssymbolsreact-hook-formworkspace:*globawaitRegExp.prototype.flagsconcatastECMAScript 2022sidefindLastIndexeventscreateRegExp#flagstypeerrorcode pointsefficientfinduptaskchromiumbannerarraysswfairbnbURLSearchParamsRxJSa11yfindLastfull-widthworkeres8
1.10.115

2 years ago

1.10.114

2 years ago

1.10.113

2 years ago

1.10.112

2 years ago

1.10.111

2 years ago

1.10.110

2 years ago

1.10.109

2 years ago

1.9.109

2 years ago

1.8.106

2 years ago

1.1.29

2 years ago

1.1.28

2 years ago

1.8.103

2 years ago

1.8.104

2 years ago

1.8.105

2 years ago

1.5.70

2 years ago

1.5.72

2 years ago

1.5.71

2 years ago

1.5.74

2 years ago

1.5.73

2 years ago

1.5.76

2 years ago

1.1.30

2 years ago

1.5.75

2 years ago

1.5.78

2 years ago

1.5.77

2 years ago

1.1.34

2 years ago

1.5.79

2 years ago

1.1.33

2 years ago

1.1.32

2 years ago

1.1.31

2 years ago

1.1.38

2 years ago

1.1.37

2 years ago

1.3.59

2 years ago

1.1.36

2 years ago

1.1.35

2 years ago

1.1.39

2 years ago

1.5.81

2 years ago

1.5.80

2 years ago

1.5.83

2 years ago

1.3.60

2 years ago

1.5.82

2 years ago

1.3.61

2 years ago

1.5.85

2 years ago

1.5.84

2 years ago

1.5.87

2 years ago

1.1.41

2 years ago

1.5.86

2 years ago

1.1.40

2 years ago

1.5.89

2 years ago

1.5.88

2 years ago

1.1.42

2 years ago

1.6.101

2 years ago

1.6.100

2 years ago

1.5.65

2 years ago

1.5.64

2 years ago

1.5.67

2 years ago

1.5.66

2 years ago

1.5.69

2 years ago

1.1.23

2 years ago

1.5.68

2 years ago

1.1.22

2 years ago

1.1.21

2 years ago

1.1.20

2 years ago

1.1.27

2 years ago

1.1.26

2 years ago

1.1.25

2 years ago

1.1.24

2 years ago

1.4.62

2 years ago

1.7.103

2 years ago

1.4.61

2 years ago

1.4.64

2 years ago

1.4.63

2 years ago

1.2.42

2 years ago

1.2.45

2 years ago

1.2.46

2 years ago

1.2.43

2 years ago

1.2.44

2 years ago

1.2.49

2 years ago

1.2.47

2 years ago

1.2.48

2 years ago

1.6.95

2 years ago

1.6.94

2 years ago

1.6.97

2 years ago

1.6.96

2 years ago

1.6.99

2 years ago

1.2.52

2 years ago

1.6.98

2 years ago

1.2.53

2 years ago

1.2.50

2 years ago

1.2.51

2 years ago

1.2.56

2 years ago

1.2.57

2 years ago

1.2.54

2 years ago

1.2.55

2 years ago

1.2.58

2 years ago

1.2.59

2 years ago

1.5.90

2 years ago

1.5.92

2 years ago

1.5.91

2 years ago

1.5.94

2 years ago

1.5.93

2 years ago

1.7.102

2 years ago

1.7.101

2 years ago

1.9.107

2 years ago

1.9.108

2 years ago

1.9.106

2 years ago

1.1.19

2 years ago

1.1.18

2 years ago

1.1.17

2 years ago

1.0.16

2 years ago

1.1.16

2 years ago

1.0.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