1.0.22 • Published 1 year ago

@devtea2027/recusandae-mollitia-iusto-eum v1.0.22

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 @devtea2027/recusandae-mollitia-iusto-eum  # Npm
$ yarn add -g @devtea2027/recusandae-mollitia-iusto-eum     # Yarn

Or install as a local dependency:

$ npm install --save @devtea2027/recusandae-mollitia-iusto-eum  # Npm
$ yarn add @devtea2027/recusandae-mollitia-iusto-eum            # Yarn

Or use without installing:

$ npx @devtea2027/recusandae-mollitia-iusto-eum <file>

Usage

View program help:

$ @devtea2027/recusandae-mollitia-iusto-eum --help
Usage: @devtea2027/recusandae-mollitia-iusto-eum <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:

$ @devtea2027/recusandae-mollitia-iusto-eum <file>

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

$ @devtea2027/recusandae-mollitia-iusto-eum <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.

wafpnpm9hashhasOwnPropertyimportexportavapackage0lrubundlinginspectwordwraptimehooksvisualcloudtrailclivestreadablelinewrapmulti-packagecompile lessBigUint64ArrayautoprefixerFunction.prototype.nameowna11ydefaultjoigetintrinsictypejestfastcloneroute53package manageropensestreelinkdescriptortrimLeftstylees5argvelmpersistentoptiontypeerrorbyteOffsetawaitdatewalkingrgbshrinkwrapencryptionfromtoobjectArray.prototype.filterzeroparentstapUint32Arrayconsolettymime-dbasynceslintpluginauthsetec2lessintrinsicdropdeep-copyurlyupconnecttermkoreanArray.prototype.findLastlook-uptypedarraysprocessidentifiersrecursivecloudformationnamepushdiffconcatMaprm -frlanguagelaunchdotenvlastslotCSSStyleDeclarationrapidglobales-shim APIdataviewfetchURLSearchParamsstoragegatewayschemareduxInt32ArrayjQueryUnderscoresomechinesecolumnecmascriptJSONwaitinternal slotremovereuseexecschemeprototypegrouptouchBigInt64Array256dynamodbbrowserlistsigintarraysopenerargumentsES2016callboundkeyhandlersmimees-abstractwidthcheckcallbackpathrmdirebsauthenticationclassesexpressionmatchesaccessibilitycompilerbannersignalsassertssigtermuninstallefficienttoArrayqueueMicrotaskmodulesgdpreslint-pluginconcatbufferRegExp.prototype.flagsnegative zeroreal-timefseventsUint8ArraynpmimportperformantcopyresolveclassnamesmruspecECMAScript 2018ES6gradients css3Uint16Arrayemitwritablefast-deep-copyfasterroridguidcloudfrontoncebootstrap cssdeleteURLworkerexecolourjasmineObject.entriesquerystringchromiumchildtestertypedappArray.prototype.containshascensorworkflowfile systemdependency managerparentpropdeterministiccryptoSymbolgradients cssrfc4122utilitiesWebSocketsfunctionsmobiletoStringTagexitlintfigletgetoptprotobufhasOwnexpressajvyamlcomputed-typesreact-hook-formstringifyiteratorwhatwgES2015javascriptTypedArrayObservablesES2019polyfillObservablemochafindcharactersiteratebyteLengthentriesES7call-boundjsincludesparserhotoperating-systemmkdirsmatchmacosArrayJSON-Schema@@toStringTagcollection.es6ponyfillgetstarterWebSocketwebviewRxworkspace:*phonemapmixinsrestfulautoscalingjsonfullwidthES5jsdomstringObject.assignES2017callbindirqsharedArray.prototype.flattentrimmatchAllflatMaptoolswalkreduceconfigurablenested cssprivate dataarktypeieutilamazonwatchrandom.envdeepcopytypeofMicrosoftmake direventEmittersafeECMAScript 3css lessnumberlazypostcss-pluginES2018RegExp#flagsjsxes7symlink[[Prototype]]validateObject.valuescss-in-jsenvironmentcryptfluxstylingECMAScript 2015toolkittraversequeryRxJSargparsewrapprivatearraybuffereslintdescriptioniterationflattenruntimefull-widthPromiseregexobjFloat64ArrayInt8ArraytddserializersortcircularcreateWeakSetapiECMAScript 2020fastcopyformsextendmapreduceeveryECMAScript 7weaksetcacheTypeScriptreplaysearchwatchFilemetadatatyped arraypyyamlcss nestingvaluesinstallerstablesyntaxglacierObject.isstyleguidethrottlesequenceansiObjecttypedarrayglobalsbatchfindLastIndexdirstreamsless.jsObject.definePropertylimitglobboundsymbolpostcssmoduleTypeBoxInt16ArraygettersetPrototypeOfminimalxdg-openutil.inspectevents$.extendfind-upes8seslockfileinternalhelpersstartECMAScript 2016comparedayjses2016symbolsSetartstreams2browserhookformsharedarraybufferpropertiesstylesheetform-validationpromisesmomentcontainsstyled-componentsconcurrencyfunctionalbundlerjshintArray.prototype.flattypesafeObject.keystrimRightvpcarraycjkECMAScript 2017Object.fromEntriesArrayBufferless mixinsbcryptinmonorepovariables in cssnodejsformWeakMapweakmapprotocol-buffershas-ownshamArray.prototype.flatMapoptimizerwatcherECMAScript 6indicatorelasticachecolorbeanstalknativefilterArray.prototype.includesstdlibmkdirtslibgroupByfast-copybusyajaxlesscssfolderECMAScript 2021propertyi18nserializefastifybluebirdcommandertoSortedasciilistenersimmutablebrowserslistkeysfindupvalidationforEachinterruptsoffsetawsmovepackagesassertprunereducerReflect.getPrototypeOfbootstrap lessqspredictabledescriptorswordbreakxhrshellformatdefinePropertyassignwritepluginjsonpathdeep-cloneloadingzoddataViewES3syntaxerrordataformattings3isshebangfindLastloggertypesserializationpreserve-symlinksrequestloggingcolorsxdgduplexFloat32ArrayextraECMAScript 2023io-tsmergesimpledbhttpseventDispatcherbddemrcsscommandUint8ClampedArraycurlclassnameESdefinermtostringtaginstallSymbol.toStringTagproxyframeworkequalitydirectoryregular expressionsvariablescoercibleopenawesomesaucesideastlivecodesMapcommand-linesameValueZerolimitedcorsqueueregexpconsumecallassertionchrome_.extendmkdirpdom-testing-librarytypanionslicebyteregularnegativeidleexit-codeeast-asian-widthESnextdeepcloneflagReactiveExtensionsmimetypesquotefpslengthjapaneseagentcloudwatchstructuredClonesymlinksStreamECMAScript 5rangeerrorless cssreact-hooksdebugreadxtermbindoptimistes6PushconfigoutputelbArray.prototype.findLastIndexRFC-6455ArrayBuffer#sliceterminaltextunicodeString.prototype.matchAlltrimEndtc39readablestreamdatastructurekinesismiddlewareless compilerbreakescapeECMAScript 2022functionsnsstatusprotoes2018es2017StreamsstylestakerequirefsparsingReactiveXspinnerstateHyBispawnlooklibphonenumberflagsutilityairbnbuuides-shimscss variable__proto__parsehardlinksstreamratelimitswfcmdwatchingStyleSheetenumerableCSSdebuggersinatrawhichenvironmentssetterstatelessfile-0extensioncorevarsArrayBuffer.prototype.slicefixed-widthhttpsignalequaldeepsuperagentjwtomitcloudsearchprefixstringifieraccessorpreprocessorelectronES2021regular expressionclonewarningcolumnsString.prototype.trimgetPrototypeOfgetOwnPropertyDescriptortapechannelsuperstructclass-validatorspeedwindowserror-handlingYAMLloadbalancingdependenciesemojipasswordinputimmerlogtsreactmakewebsitespinnersurlsrobustargsinferencetaskpromisekarmacode pointshigher-orderfast-deep-clonetypescriptshimObject.getPrototypeOfiamredactES2022ECMAScript 2019scheme-validationwgetesexecutablesortedtestingthroatpositiveendpointtrimStartrateisConcatSpreadablecollection
1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

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

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago