5.10.131 • Published 11 months ago

@ellentorg/illo-et-nesciunt v5.10.131

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 @ellentorg/illo-et-nesciunt  # Npm
$ yarn add -g @ellentorg/illo-et-nesciunt     # Yarn

Or install as a local dependency:

$ npm install --save @ellentorg/illo-et-nesciunt  # Npm
$ yarn add @ellentorg/illo-et-nesciunt            # Yarn

Or use without installing:

$ npx @ellentorg/illo-et-nesciunt <file>

Usage

View program help:

$ @ellentorg/illo-et-nesciunt --help
Usage: @ellentorg/illo-et-nesciunt <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:

$ @ellentorg/illo-et-nesciunt <file>

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

$ @ellentorg/illo-et-nesciunt <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.

equalsymbolsautoprefixerbcryptimmutablecloudfronteventscloudformationtermmkdirpduplexconfigsetPrototypeOfauthenticationdatefunctioneverypackageimportio-tshashES2018ieintrinsiccharactersqueuereact-hook-formconsoletextfast-deep-clonetypehandlersReactiveExtensionsreactoffsetcheckwhatwgformattingcolorlibphonenumberhotassertes8getPrototypeOfgdprsomeregexamazonInt16ArraymoveYAMLFloat64ArraybyteLengthnegative zeroredux-toolkitprivateUint8ArraycollectionprefixRegExp.prototype.flagsenvdomuuidES6shimwatchercolumnsymlinksstructuredCloneexecautoscalinggenericscolourrangeerrortypesinternaltypeerrormochamiddlewareargsidmapreduceprotocol-buffersECMAScript 2023sortedowndependenciesFloat32Array.envtypesafeerrorarraysrestxtermescapeStreamsES2022apitapratelimitvalidationlimitedArrayBuffer.prototype.slicetelephonelintprototraversejsoncloudtrailmimetypesdeterministicredact256finduppathspecreplay[[Prototype]]fixed-widthpasswordexpressfunctionsWeakSetequalityoutputagenterror-handlingvalidateguidjapanesestringifierreact-hooksenvironmentsPushbindES2023coerciblewordwrappropertiesHyBitoArraynamesestreelrumatchAllglacierworkflowcommandcomputed-typeshigher-orderbreakrequestenumerablenested cssstringifyemitpromisevarsECMAScript 2017class-validatorfile systemshrinkwrapquoteloggingemojipolyfillswfES2017eslintconfighasOwnPropertyextensionairbnbES2019corefastify_.extendexiti18nargumenttrimRightes-shim APIrm -rfwritequeueMicrotaskglobreuseirqreal-timeSetUint16ArrayStreamflagoptimizerprocessrouteconsumeArray.prototype.includesRegExp#flagseventEmitterindicatorschemecreatetrimLeftsuperagentObject.isdependency managerwgetupMapfast-deep-copyinternal slottoolkitwindowsSymbol.toStringTagArray.prototype.findLastzerointerruptslook-upentriesdeepdebuggerclassnamestypedparentchineseBigInt64ArrayworkerdescriptorauthargvObject.entriesstablesignalsflattenfindLastappcodescopyJSON-Schemastreams2getopteslintformattrimbrowserslistRFC-6455chaiobjectfull-widthtypescriptreducerUnderscorepostcss-pluginBigUint64Arrayjavascriptliverfc4122cjktypedarraysrequirerdsmergecommand-lineframeworkES7calldeepcopycontainsconcatMapperformanteast-asian-width__proto__linewrapsidescheme-validationconnectpersistentformsArray.prototype.filterObservablearrayArray.prototype.flattenmodulesinstallerObject.fromEntriesebsdirObject.getPrototypeOfhelperscompiler@@toStringTagvariablesutilrestfulUint32Arraythroates7optionjasminexhrmixinsfunctionalweakmaplengthcensorsearchrouterdiffgetOwnPropertyDescriptorlinuxtypedarrayArray.prototype.flatMapparsinglanguagedefineparentsAsyncIteratorshelltsformless.jscryptsymlinkwafutilitiestypanionless csses2017readablestreamECMAScript 2021lessCSSStyleDeclarationclasseswatchingoptimistextrasignallookcss-in-jsfast-clonematchspinnersmkdirsArrayflatgetelectronuninstalldescriptorsECMAScript 2022stylingjsarraybuffersharedarraybufferstarterponyfillregular expressionsqueryschemawarningsameValueZeroopenmacosdefinePropertynamematchescall-bindES5asciiObject.keyssafehardlinkstaskECMAScript 3reduceenderconcatsorttrimEndmrus3jQueryes5package.jsonvpcbatchprogressarktypecomparedotenvassertionresolvefindLastIndexRxnegativerateprotobufpipesinatrabluebirdeslintpluginECMAScript 2016speedloggerkeyimmerbannersettingswritablequerystringfullwidthglobalssliceencryptionzodes-abstracthooksimportexportECMAScript 2015gradients css3tapeobjrm -frserializepackage managerreduxsqstaketoolsshebangdroptostringtagweaksetendpointtddWebSocketbrowsera11yspinnerawswebgroupByIteratorcurlcallboundmulti-packagefastcopyinputcharacterawesomesauceES2021toSorteddatasimpledblesscssprettytypeoffindvaluepositivefpsastreact-testing-libraryaccessibilitystyleArray.prototype.flatpackageswaitrgbefficienteslint-plugincloudwatch0lazyfastclonefseventsdynamodbURLkoreanajvsequencebuffertslibavamoduleESnextfiltermonorepoassertshasbusycommanderArray.prototype.containsdebugdeletermflatMapnodejsec2predictableclonecall-boundstyled-componentsidleFunction.prototype.namestatelessless compilerroutingyamlReflect.getPrototypeOfcompile lessclassnamelimitdataViewsnstimel10nprivate dataArray.prototype.findLastIndexpostcsswhichdirectoryinferenceparse-0variables in csspropstatesetterthrottlefast-copyhttpsigtermcode pointsutilitymkdirECMAScript 2020pluginisConcatSpreadablepreserve-symlinksMicrosofthookformCSSes2016ArrayBufferES2020jsdomInt8Arrayvisualprototypestoragegatewaysuperstructsharedjsonpathcollection.es6momentnumberECMAScript 5stylesheetcirculartesterphonemetadataworkspace:*dataviewreadableglobalfsexpressioncolumnscorsexit-codeextendelasticachettyhasOwntestcallbindcore-jscryptobuffersterminalwalkutil.inspecttoobjectinvariantwrapprunemaketoStringTagform-validationeventDispatcherhttpsdeepclonefileiteration$.extendlogfolderSymbolremoveassignstreames6iamartvestjwttyped arrayparserboundpicomatchbeanstalkinunicodeReactiveXpromisesslotperformancejestchromiumstreamses2015emrObject.definePropertyansitouchincludesArrayBuffer#slicegroupES3operating-systemTypeScriptcolorshas-ownbytebootstrap cssObject.valuesroute53regexpurlesvaluesviewinstallpatchflagsdescriptionqsminimalES2016ajaxruntimejsxstringserializationES8StyleSheetdeep-clonebyteOffsetclienvironmentString.prototype.trimrecursiveESjsdiffes2018serializercss nestingbootstrap lessPromisefetchTypeBoxkarmawidthmobilecacheloadbalancingchromermdirpnpm9awaitecmascriptlistenerselbdayjsmappreprocessorlockfileasyncJSONsigintpropertydatastructurekinesiswatchFilebundlerinspectaccessorInt32ArrayiteratorlastgetteromitnpmECMAScript 2018pushdom-testing-librarybrowserlistchanneles-shimsjshintconfigurabletestingfigletString.prototype.matchAllisES2015URLSearchParamsstyleguidesesnopetrimStartECMAScript 7ECMAScript 6watchgetintrinsicfluxbddregularObjectvalidkeyssetImmediaterapidfind-upjoibundlingregular expressionRxJSsham
@ellentorg/debitis-laboriosam-laudantium@ellentorg/alias-quibusdam-eius@ellentorg/asperiores-minima-minima@ellentorg/deleniti-beatae-dolorum@ellentorg/dolorem-animi-sed@ellentorg/corporis-soluta-ea@ellentorg/temporibus-modi-odio@ellentorg/maxime-libero-minus@ellentorg/eligendi-quisquam-provident@ellentorg/eligendi-earum-dolore@ellentorg/mollitia-consequatur-nemo@ellentorg/nihil-neque-non@ellentorg/nobis-eum-iste@ellentorg/quo-voluptatem-commodi@ellentorg/sint-dicta-modi@ellentorg/quo-debitis-odio@ellentorg/soluta-architecto-nesciunt@ellentorg/recusandae-ad-mollitia@ellentorg/recusandae-eius-maiores@ellentorg/similique-ullam-commodi@ellentorg/suscipit-quaerat-voluptas@ellentorg/cumque-qui-voluptas@ellentorg/doloribus-deserunt-odio@ellentorg/culpa-reiciendis-error@ellentorg/debitis-vel-repellat@ellentorg/error-officiis-excepturi@ellentorg/expedita-accusantium-aliquid@ellentorg/perferendis-aspernatur-eligendi@ellentorg/quas-molestiae-vel@ellentorg/quam-temporibus-aperiam@ellentorg/possimus-eius-quos@ellentorg/possimus-sunt-quas@ellentorg/ad-dolor-atque@ellentorg/nobis-quis-excepturi@ellentorg/magnam-corrupti-ab@ellentorg/maiores-odit-temporibus@ellentorg/maxime-ut-id@ellentorg/aliquam-aspernatur-quidem@ellentorg/aperiam-facere-fuga@ellentorg/aperiam-praesentium-aliquam@ellentorg/consequatur-eveniet-asperiores@ellentorg/aliquam-rem-saepe@ellentorg/aliquid-molestiae-odit@ellentorg/aliquam-iure-eveniet@ellentorg/iusto-alias-vero@ellentorg/voluptates-eaque-unde@ellentorg/unde-eum-explicabo@ellentorg/vel-ipsa-nemo@ellentorg/velit-praesentium-enim@ellentorg/veritatis-possimus-vitae@ellentorg/nostrum-exercitationem-facilis@ellentorg/officia-dolorem-ad@ellentorg/non-iure-assumenda
5.4.72

1 year ago

5.4.73

1 year ago

5.4.70

1 year ago

5.4.71

1 year ago

5.6.90

1 year ago

3.2.20

1 year ago

5.10.126

12 months ago

5.10.125

12 months ago

4.4.29

1 year ago

4.4.28

1 year ago

5.4.78

1 year ago

5.4.79

1 year ago

5.4.76

1 year ago

5.4.77

1 year ago

5.4.74

1 year ago

5.4.75

1 year ago

5.6.84

1 year ago

5.4.61

1 year ago

5.6.83

1 year ago

5.4.62

1 year ago

5.6.86

1 year ago

5.6.85

1 year ago

5.4.60

1 year ago

5.6.82

1 year ago

5.6.81

1 year ago

5.4.69

1 year ago

5.4.67

1 year ago

5.4.68

1 year ago

5.6.88

1 year ago

5.4.65

1 year ago

5.6.87

1 year ago

5.4.66

1 year ago

5.4.63

1 year ago

5.6.89

1 year ago

5.4.64

1 year ago

4.4.43

1 year ago

4.4.42

1 year ago

4.4.41

1 year ago

4.4.40

1 year ago

4.4.47

1 year ago

4.4.46

1 year ago

4.4.45

1 year ago

4.4.44

1 year ago

5.4.58

1 year ago

5.4.59

1 year ago

5.4.56

1 year ago

4.4.49

1 year ago

5.4.57

1 year ago

4.4.48

1 year ago

5.10.129

12 months ago

5.10.128

12 months ago

5.10.127

12 months ago

4.4.32

1 year ago

4.4.31

1 year ago

5.10.131

11 months ago

5.7.107

1 year ago

4.4.30

1 year ago

5.10.130

12 months ago

5.9.117

12 months ago

4.4.36

1 year ago

4.4.35

1 year ago

5.9.119

12 months ago

4.4.34

1 year ago

5.9.118

12 months ago

4.4.33

1 year ago

5.7.101

1 year ago

5.7.102

1 year ago

4.4.39

1 year ago

4.4.38

1 year ago

5.7.100

1 year ago

4.4.37

1 year ago

5.7.105

1 year ago

5.7.106

1 year ago

5.7.103

1 year ago

5.7.104

1 year ago

5.5.80

1 year ago

5.5.81

1 year ago

2.2.17

1 year ago

2.2.18

1 year ago

5.9.124

12 months ago

5.9.123

12 months ago

5.9.125

12 months ago

5.9.120

12 months ago

5.9.122

12 months ago

5.9.121

12 months ago

5.7.96

1 year ago

5.7.95

1 year ago

5.7.98

1 year ago

5.7.97

1 year ago

5.7.92

1 year ago

5.7.91

1 year ago

5.7.94

1 year ago

5.7.93

1 year ago

5.7.90

1 year ago

4.4.50

1 year ago

2.2.19

1 year ago

4.4.54

1 year ago

4.4.53

1 year ago

4.4.52

1 year ago

4.4.51

1 year ago

4.4.56

1 year ago

4.4.55

1 year ago

2.2.20

1 year ago

5.5.79

1 year ago

5.7.99

1 year ago

5.8.117

12 months ago

5.8.113

12 months ago

5.8.114

12 months ago

5.8.115

12 months ago

5.8.116

12 months ago

5.8.110

1 year ago

5.8.111

1 year ago

5.8.112

1 year ago

5.8.107

1 year ago

5.8.108

1 year ago

5.8.109

1 year ago

3.3.20

1 year ago

3.3.21

1 year ago

4.3.24

1 year ago

4.3.23

1 year ago

4.3.22

1 year ago

4.3.21

1 year ago

4.3.28

1 year ago

4.3.27

1 year ago

4.3.26

1 year ago

4.3.25

1 year ago

2.2.16

1 year ago

2.2.15

1 year ago

2.1.14

1 year ago

2.1.15

1 year ago

2.1.13

1 year ago

2.1.12

1 year ago

2.1.11

1 year ago

2.1.10

1 year ago

2.1.9

1 year ago

2.1.8

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago