4.7.116 • Published 2 years ago

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

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/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

2 years ago

4.7.115

2 years ago

4.7.114

2 years ago

4.7.113

2 years ago

4.7.112

2 years ago

3.7.112

2 years ago

3.7.111

2 years ago

3.7.110

2 years ago

2.3.39

2 years ago

2.3.38

2 years ago

2.3.35

2 years ago

2.3.34

2 years ago

2.3.37

2 years ago

2.3.36

2 years ago

2.7.77

2 years ago

2.3.31

2 years ago

2.7.76

2 years ago

2.3.30

2 years ago

2.7.75

2 years ago

2.3.33

2 years ago

2.3.32

2 years ago

2.7.79

2 years ago

2.7.78

2 years ago

2.7.80

2 years ago

2.7.84

2 years ago

2.7.83

2 years ago

2.7.82

2 years ago

2.7.81

2 years ago

1.3.30

2 years ago

2.7.88

2 years ago

2.5.65

2 years ago

2.3.42

2 years ago

2.7.87

2 years ago

2.5.66

2 years ago

2.3.41

2 years ago

2.7.86

2 years ago

2.5.67

2 years ago

2.7.85

2 years ago

2.5.68

2 years ago

2.3.43

2 years ago

2.3.40

2 years ago

2.7.89

2 years ago

2.5.64

2 years ago

2.7.91

2 years ago

2.7.90

2 years ago

2.7.95

2 years ago

2.7.94

2 years ago

2.7.93

2 years ago

2.7.92

2 years ago

2.7.102

2 years ago

2.7.103

2 years ago

2.7.104

2 years ago

2.7.105

2 years ago

2.7.99

2 years ago

2.7.98

2 years ago

2.7.97

2 years ago

2.7.96

2 years ago

2.7.100

2 years ago

2.7.101

2 years ago

2.4.47

2 years ago

2.4.46

2 years ago

1.3.21

2 years ago

2.4.49

2 years ago

2.4.48

2 years ago

2.4.43

2 years ago

1.3.24

2 years ago

1.3.25

2 years ago

2.6.68

2 years ago

2.4.45

2 years ago

1.3.22

2 years ago

2.6.69

2 years ago

2.4.44

2 years ago

1.3.23

2 years ago

1.3.28

2 years ago

1.3.29

2 years ago

1.3.26

2 years ago

1.3.27

2 years ago

3.7.107

2 years ago

3.7.108

2 years ago

2.6.70

2 years ago

3.7.105

2 years ago

2.6.71

2 years ago

3.7.106

2 years ago

2.6.72

2 years ago

3.7.109

2 years ago

2.4.58

2 years ago

2.4.57

2 years ago

1.2.20

2 years ago

2.4.59

2 years ago

2.4.54

2 years ago

2.4.53

2 years ago

2.4.56

2 years ago

1.2.21

2 years ago

2.4.55

2 years ago

2.6.73

2 years ago

2.4.50

2 years ago

2.6.74

2 years ago

2.6.75

2 years ago

2.4.52

2 years ago

2.4.51

2 years ago

2.4.64

2 years ago

2.4.61

2 years ago

2.4.60

2 years ago

2.4.63

2 years ago

2.4.62

2 years ago

1.2.19

2 years ago

1.2.18

2 years ago

1.2.16

2 years ago

1.2.17

2 years ago

1.2.15

2 years ago

1.2.14

2 years ago

1.2.13

2 years ago

1.2.12

2 years ago

1.2.11

2 years ago

1.2.10

2 years ago

1.1.10

2 years ago

1.1.9

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

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago