1.10.115 • Published 11 months ago

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

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months 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

11 months ago

1.10.114

11 months ago

1.10.113

11 months ago

1.10.112

11 months ago

1.10.111

11 months ago

1.10.110

11 months ago

1.10.109

11 months ago

1.9.109

11 months ago

1.8.106

11 months ago

1.1.29

1 year ago

1.1.28

1 year ago

1.8.103

11 months ago

1.8.104

11 months ago

1.8.105

11 months ago

1.5.70

1 year ago

1.5.72

1 year ago

1.5.71

1 year ago

1.5.74

12 months ago

1.5.73

12 months ago

1.5.76

12 months ago

1.1.30

1 year ago

1.5.75

12 months ago

1.5.78

12 months ago

1.5.77

12 months ago

1.1.34

1 year ago

1.5.79

12 months ago

1.1.33

1 year ago

1.1.32

1 year ago

1.1.31

1 year ago

1.1.38

1 year ago

1.1.37

1 year ago

1.3.59

1 year ago

1.1.36

1 year ago

1.1.35

1 year ago

1.1.39

1 year ago

1.5.81

12 months ago

1.5.80

12 months ago

1.5.83

12 months ago

1.3.60

1 year ago

1.5.82

12 months ago

1.3.61

1 year ago

1.5.85

12 months ago

1.5.84

12 months ago

1.5.87

12 months ago

1.1.41

1 year ago

1.5.86

12 months ago

1.1.40

1 year ago

1.5.89

12 months ago

1.5.88

12 months ago

1.1.42

1 year ago

1.6.101

11 months ago

1.6.100

11 months ago

1.5.65

1 year ago

1.5.64

1 year ago

1.5.67

1 year ago

1.5.66

1 year ago

1.5.69

1 year ago

1.1.23

1 year ago

1.5.68

1 year ago

1.1.22

1 year ago

1.1.21

1 year ago

1.1.20

1 year ago

1.1.27

1 year ago

1.1.26

1 year ago

1.1.25

1 year ago

1.1.24

1 year ago

1.4.62

1 year ago

1.7.103

11 months ago

1.4.61

1 year ago

1.4.64

1 year ago

1.4.63

1 year ago

1.2.42

1 year ago

1.2.45

1 year ago

1.2.46

1 year ago

1.2.43

1 year ago

1.2.44

1 year ago

1.2.49

1 year ago

1.2.47

1 year ago

1.2.48

1 year ago

1.6.95

11 months ago

1.6.94

11 months ago

1.6.97

11 months ago

1.6.96

11 months ago

1.6.99

11 months ago

1.2.52

1 year ago

1.6.98

11 months ago

1.2.53

1 year ago

1.2.50

1 year ago

1.2.51

1 year ago

1.2.56

1 year ago

1.2.57

1 year ago

1.2.54

1 year ago

1.2.55

1 year ago

1.2.58

1 year ago

1.2.59

1 year ago

1.5.90

12 months ago

1.5.92

12 months ago

1.5.91

12 months ago

1.5.94

11 months ago

1.5.93

11 months ago

1.7.102

11 months ago

1.7.101

11 months ago

1.9.107

11 months ago

1.9.108

11 months ago

1.9.106

11 months ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.0.16

1 year ago

1.1.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago