9.10.108 • Published 1 year ago

@devtea2026/hic-asperiores-dicta-deleniti v9.10.108

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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/hic-asperiores-dicta-deleniti  # Npm
$ yarn add -g @devtea2026/hic-asperiores-dicta-deleniti     # Yarn

Or install as a local dependency:

$ npm install --save @devtea2026/hic-asperiores-dicta-deleniti  # Npm
$ yarn add @devtea2026/hic-asperiores-dicta-deleniti            # Yarn

Or use without installing:

$ npx @devtea2026/hic-asperiores-dicta-deleniti <file>

Usage

View program help:

$ @devtea2026/hic-asperiores-dicta-deleniti --help
Usage: @devtea2026/hic-asperiores-dicta-deleniti <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/hic-asperiores-dicta-deleniti <file>

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

$ @devtea2026/hic-asperiores-dicta-deleniti <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.

signalutilenvrouterregexpstylesheetfolderreusefilestreamlinkmulti-package_.extendfind-upagentmovejapanesecsseslintassertnameObservablescolorsopenermiddlewareinvariantimportmapcss lessprogressECMAScript 5glaciereast-asian-widthcloudtraildirisConcatSpreadablestoragegatewaytypeofminimalenumerablewatcheriteratorbusytextpreprocessorstdlibcolourecmascriptlookelasticachevalidationtestTypeScriptcollectionbluebirdrmviewsharedarraybuffertrimassertionMicrosofttypeclassnameslotsinatrajsxdefinePropertysuperagentTypeBoxgenericspicomatchless compilerJSONsideremoveponyfilltostringtaginternalarraybufferpostcss-pluginerror-handlingshamhigher-ordermakecheckmochasettingsTypedArrayReactiveXcorewordbreaksymbolssigintoptionhttpsbytewatchreplaypackage managerglobalscomputed-typescomparelogECMAScript 2021less cssexpressionquerybootstrap lessArray.prototype.flatUint8ClampedArrayiam__proto__uninstallCSSfluxquotesetPrototypeOfMapargumenteslintconfiggetOwnPropertyDescriptortslibthroatECMAScript 7pushexit-codetrimEndbatchnegativekoreancloudformationyupequalfile systemenvironmenttypescriptcurlintrinsices2015momentfastwalkreal-timedescriptorES2016airbnbECMAScript 2022schemacommand-linecodesefficientstylesjshinttrimRightreact-testing-libraryttycss nestingismergetypeerrorinternal slotoptimizerforEacherrorjQueryes8Object.entriesyamlmake dirkinesisvalidstartsetterObject.isshrinkwrapwgetinspectdeepcopytimeSetimportexportInt32ArrayawaittapeframeworkStreamshookformfulljsObject.valuesArrayhttpargvstreams2hasOwnPropertyes7extensionexecopensreaddatastructurextermtsreactlengthglobaccessorES2018entriesrgbFloat64ArrayReflect.getPrototypeOfpreserve-symlinksendercall-boundtakeperformantstringifyconcatworkspace:*namesECMAScript 2019debugFunction.prototype.namesqswebloggingcss variablermdirstateescapefilterexecutablematchAllprotocol-buffershelpersform-validationprefixscheme-validationcall-bindlanguageprotoIteratordom-testing-libraryprunees-abstractxhrrestECMAScript 3objectnodejsgradients cssRxJShas-ownfunctionprivatearktypedeterministicjsonpathcreateeveryplugingdprcmdrateRegExp#flagsdescriptorsstyled-componentslockfiledebuggerpropertyes-shimscachesafeconsumecommandercharacterextendtoStringTagbeanstalkbootstrap cssreadabletoArrays3rm -rfhasloadbalancinges6wrapinputrobustmimetoolkites2016ES2019schemepipeWebSocketguidhooksUnderscoreECMAScript 2023reducecallboundtoobjectprocesselbtypanionwidthestreeastgetintrinsicES5optimistrangeerrorenvironmentsArray.prototype.flatMapbrowserperformanceparentcolumnutilitysimpledbutil.inspectSymbolsortcolorsomesortedfindLastRxarraynodestatusliveasyncfpsansiformattingavaserializelastloadingmacositerateunicodeindicatorcircularcoercibleArray.prototype.findLastIndextddstructuredCloneconcatMappersistenttouchartdata@@toStringTagsequenceparsingmkdirpstylingfast-deep-copyfindLastIndexpropjsdiffparentssetImmediateregexjasminestreamsbyteOffsetsuperstructchanneltypessyntaxerrorincludessnsl10nkeyswatchFileresolvees-shim APICSSStyleDeclarationnativeAsyncIteratorswfless.jsArrayBuffertestingES2022varsbufferclassnameslook-upInt16ArraywafargumentsECMAScript 2020nopedependenciesassignwatchingECMAScript 2015stylefigletcliformless mixinsaccessibilitygetoptES2021startersymbolcloudsearchstringifierdeepchromiumArray.prototype.containsfast-copycopyURLduplexkeydynamodbextraArray.prototype.filterqsinstallertoolsdotenvchildequalitystatelesssigtermformspositiveES2015
9.10.108

1 year ago

9.10.107

1 year ago

8.10.107

1 year ago

8.10.106

1 year ago

8.10.105

1 year ago

7.10.105

1 year ago

7.10.104

1 year ago

7.10.103

1 year ago

5.4.61

1 year ago

5.4.62

1 year ago

5.4.60

1 year ago

4.3.42

1 year ago

2.3.39

1 year ago

2.3.38

1 year ago

4.3.44

1 year ago

2.3.37

1 year ago

4.3.43

1 year ago

2.3.36

1 year ago

5.4.67

1 year ago

5.4.68

1 year ago

5.4.65

1 year ago

5.4.66

1 year ago

5.4.63

1 year ago

5.4.64

1 year ago

5.6.73

1 year ago

5.4.50

1 year ago

5.4.51

1 year ago

5.6.75

1 year ago

5.6.74

1 year ago

7.8.86

1 year ago

7.8.85

1 year ago

7.8.89

1 year ago

7.8.88

1 year ago

7.8.87

1 year ago

6.6.80

1 year ago

2.1.25

1 year ago

4.4.47

1 year ago

2.1.23

1 year ago

4.4.46

1 year ago

2.1.24

1 year ago

4.4.45

1 year ago

2.1.21

1 year ago

4.4.44

1 year ago

2.1.22

1 year ago

5.4.58

1 year ago

5.4.59

1 year ago

2.1.20

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

1 year ago

5.6.76

1 year ago

5.4.55

1 year ago

5.4.52

1 year ago

2.3.40

1 year ago

5.4.53

1 year ago

7.8.93

1 year ago

7.8.92

1 year ago

7.8.91

1 year ago

7.8.90

1 year ago

7.8.97

1 year ago

6.6.77

1 year ago

7.8.96

1 year ago

6.6.78

1 year ago

7.8.95

1 year ago

6.6.79

1 year ago

7.8.94

1 year ago

7.8.99

1 year ago

7.8.98

1 year ago

6.6.76

1 year ago

7.6.80

1 year ago

7.6.83

1 year ago

7.6.82

1 year ago

7.6.81

1 year ago

7.9.100

1 year ago

7.9.102

1 year ago

7.9.101

1 year ago

5.5.73

1 year ago

5.5.71

1 year ago

5.5.72

1 year ago

5.5.70

1 year ago

3.3.40

1 year ago

3.3.41

1 year ago

4.4.50

1 year ago

3.3.42

1 year ago

2.2.28

1 year ago

2.2.29

1 year ago

2.2.26

1 year ago

2.2.27

1 year ago

2.2.25

1 year ago

7.9.99

1 year ago

7.10.102

1 year ago

2.2.35

1 year ago

2.2.36

1 year ago

2.2.33

1 year ago

2.2.34

1 year ago

2.2.31

1 year ago

2.2.32

1 year ago

5.5.68

1 year ago

5.5.69

1 year ago

2.2.30

1 year ago

7.7.85

1 year ago

7.7.84

1 year ago

7.7.83

1 year ago

2.1.19

1 year ago

2.1.18

1 year ago

2.1.16

1 year ago

2.1.17

1 year ago

2.1.15

1 year ago

2.1.14

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

2.1.7

1 year ago

2.1.6

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago