4.7.116 • Published 11 months ago

@devtea2026/repudiandae-voluptatem-voluptatibus-vel v4.7.116

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/repudiandae-voluptatem-voluptatibus-vel  # Npm
$ yarn add -g @devtea2026/repudiandae-voluptatem-voluptatibus-vel     # Yarn

Or install as a local dependency:

$ npm install --save @devtea2026/repudiandae-voluptatem-voluptatibus-vel  # Npm
$ yarn add @devtea2026/repudiandae-voluptatem-voluptatibus-vel            # Yarn

Or use without installing:

$ npx @devtea2026/repudiandae-voluptatem-voluptatibus-vel <file>

Usage

View program help:

$ @devtea2026/repudiandae-voluptatem-voluptatibus-vel --help
Usage: @devtea2026/repudiandae-voluptatem-voluptatibus-vel <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/repudiandae-voluptatem-voluptatibus-vel <file>

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

$ @devtea2026/repudiandae-voluptatem-voluptatibus-vel <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.

extendJSONpolyfillcss variablefind-upsharedarraybuffergroupuuidparserurlagentwhatwgless.jstouchweaksetclass-validatorflatMapzodlinktrimRightgdprStreamsinatrastringexit-codedataViewcallcall-bindECMAScript 6multi-packageboundTypeBoxBigInt64Arrayfast-deep-clonemimeawsfluxes5identifiersES2018tostringtageventEmitterguidTypedArrayObject.assignchannelUint8Arraytyped arraylinuxiteratedroperror-handlingfastString.prototype.matchAllexitequalityawesomesauceencryptionUnderscorearrays0Uint8ClampedArrayfullArrayBufferentriesArray.prototype.flaterrorgetintrinsiceslint-pluginfast-copymoduleses2018frameworkdomgetPrototypeOfdescriptionwrapfunctionhookformserializationtypedmime-dbshamcryptocolorObject.entriestrimStartsetterstylesheetrfc4122ECMAScript 2017statestreamses-shimsenumerablestylingeventsECMAScript 2020s3symbolSymbol.toStringTagschemepipecircularamazonArray.prototype.findLastIndexESnexttapenderwebfindhasvisualstoragegatewayyupstdlibinstallervpcargvrestfuloutputvestArray.prototype.filterfunctionsloadingtermastjsdiffObject.valuesconcatMapwordwrapmobileCSSStyleDeclarationstructuredClonefetchgetoptECMAScript 2018wgetlooklivenumberthroathashhotresolveassertsrequestcharacterBigUint64Arraystatusinternal slotArray.prototype.findLastgraphqlhigher-orderpatchprettydeletea11yquerystringphonesuperagentmiddlewaremoduleajvbundlingenvironmentsscheme-validationratelimitsetImmediatelesscssio-tsmruObservablevariablespositiveSet_.extendvalidfixed-widthnamesettingsmkdirp[[Prototype]]Observableses8timeobjassertpreprocessorstarterserializeeslintplugincloudformationpersistentelectronfull-widthreadablestreammonoreporm -frcommandforEachhasOwnPropertyworkerrm -rfdom-testing-libraryES2019Reflect.getPrototypeOfcompile lessloadbalancingavaemojifsterminalwordbreakprivateES7setPrototypeOfStyleSheetcssimmutablewalkingworkspace:*symlinkprototypesameValueZeroimmerconcurrencyconfigurableirqwritablefast-deep-copybrowserslistfindupcloudtrailreplayString.prototype.trimdefinePropertyMicrosofttestingMapquotestylesarraybuffertraverseweakmapfastcloneelasticacheECMAScript 2023owncoerciblebrowsershimassigntypanionreact-hook-formparsesort256URLSearchParamsperformancebusyfastcopypicomatchglobalbreakkarmasnstexttrimLeftebswalkreact-testing-librarywafdescriptordeterministicregularredactcomputed-typesregular expressionpackage managerES2020queuearktypestylefigletstatelesscss-in-jsCSSschemaconsumeinpreserve-symlinksspinnerexpressgradients css3has-owninspectwatchercommanderfastifyremoveYAMLWeakSetinstalltestenvflagsreadUint16Arrayduplexstringifyuninstallbluebirdsomejsdomfast-clonechromeprefixObject.getPrototypeOfauthenticationautoscalingchineseapitrimEndswfshellObject.ismapformatproplimitregexpformES8protocol-buffersmapreduceES5createES2021frompushgetterfullwidthemites2017accessortapetypesbuffersreducerqueueMicrotasksortedrequirecloudwatchRxJSauthiterationESiteratorsignalflagObject.fromEntriesautoprefixermomentgetnegative zeronopeES2022sidetddclassesFloat32ArrayjshintthrottleJSON-SchemaInt16Arrayproto$.extendflatparsingansiwatchingopen__proto__hookseast-asian-widthgetOwnPropertyDescriptorjoisharedpnpm9zeroreactinvarianttypeyamlpackageES3hardlinksoffsetstyled-components
4.7.116

11 months ago

4.7.115

11 months ago

4.7.114

11 months ago

4.7.113

11 months ago

4.7.112

11 months ago

3.7.112

11 months ago

3.7.111

11 months ago

3.7.110

11 months ago

2.3.39

1 year ago

2.3.38

1 year ago

2.3.35

1 year ago

2.3.34

1 year ago

2.3.37

1 year ago

2.3.36

1 year ago

2.7.77

1 year ago

2.3.31

1 year ago

2.7.76

1 year ago

2.3.30

1 year ago

2.7.75

1 year ago

2.3.33

1 year ago

2.3.32

1 year ago

2.7.79

12 months ago

2.7.78

12 months ago

2.7.80

12 months ago

2.7.84

12 months ago

2.7.83

12 months ago

2.7.82

12 months ago

2.7.81

12 months ago

1.3.30

1 year ago

2.7.88

12 months ago

2.5.65

1 year ago

2.3.42

1 year ago

2.7.87

12 months ago

2.5.66

1 year ago

2.3.41

1 year ago

2.7.86

12 months ago

2.5.67

1 year ago

2.7.85

12 months ago

2.5.68

1 year ago

2.3.43

1 year ago

2.3.40

1 year ago

2.7.89

12 months ago

2.5.64

1 year ago

2.7.91

12 months ago

2.7.90

12 months ago

2.7.95

12 months ago

2.7.94

12 months ago

2.7.93

12 months ago

2.7.92

12 months ago

2.7.102

11 months ago

2.7.103

11 months ago

2.7.104

11 months ago

2.7.105

11 months ago

2.7.99

11 months ago

2.7.98

11 months ago

2.7.97

12 months ago

2.7.96

12 months ago

2.7.100

11 months ago

2.7.101

11 months ago

2.4.47

1 year ago

2.4.46

1 year ago

1.3.21

1 year ago

2.4.49

1 year ago

2.4.48

1 year ago

2.4.43

1 year ago

1.3.24

1 year ago

1.3.25

1 year ago

2.6.68

1 year ago

2.4.45

1 year ago

1.3.22

1 year ago

2.6.69

1 year ago

2.4.44

1 year ago

1.3.23

1 year ago

1.3.28

1 year ago

1.3.29

1 year ago

1.3.26

1 year ago

1.3.27

1 year ago

3.7.107

11 months ago

3.7.108

11 months ago

2.6.70

1 year ago

3.7.105

11 months ago

2.6.71

1 year ago

3.7.106

11 months ago

2.6.72

1 year ago

3.7.109

11 months ago

2.4.58

1 year ago

2.4.57

1 year ago

1.2.20

1 year ago

2.4.59

1 year ago

2.4.54

1 year ago

2.4.53

1 year ago

2.4.56

1 year ago

1.2.21

1 year ago

2.4.55

1 year ago

2.6.73

1 year ago

2.4.50

1 year ago

2.6.74

1 year ago

2.6.75

1 year ago

2.4.52

1 year ago

2.4.51

1 year ago

2.4.64

1 year ago

2.4.61

1 year ago

2.4.60

1 year ago

2.4.63

1 year ago

2.4.62

1 year ago

1.2.19

1 year ago

1.2.18

1 year ago

1.2.16

1 year ago

1.2.17

1 year ago

1.2.15

1 year ago

1.2.14

1 year ago

1.2.13

1 year ago

1.2.12

1 year ago

1.2.11

1 year ago

1.2.10

1 year ago

1.1.10

1 year ago

1.1.9

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

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago