npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ptkhanh94npm/consequatur-sequi-provident

v1.0.0

Published

<p align="center"> <img src="https://user-images.githubusercontent.com/2003143/29374843-1fa78a3e-82c8-11e7-80a3-0786f899749d.png" alt="@ptkhanh94npm/consequatur-sequi-provident logo" /> </p>

Downloads

3

Keywords

ECMAScript 2020spinnerdebugECMAScript 2023AsyncIteratorrapidexpressioni18nsymlinkframeworkmodulesttycommandpluginoperating-systemsharedarraybuffergetintrinsicfullwidthclones3-0typanionsqsbundlerajaxmimetypesiedynamodbmetadatasortedES5numberReflect.getPrototypeOfclassnamefiltereventEmitterIteratorfpsintrinsicmoveArray.prototype.includespredictabledataViewUint8Arraydropemitmkdirpfullflattenreadablespecmulti-packageformatloadbalancingcensorclientECMAScript 2021workflowjsonpathio-tsWebSocketsafeirql10nerror-handlinggdprrobustSetRegExp#flagsuuidsearcheveryawsupruntimeisBigInt64Arrayfast-deep-clonedescriptormobileWeakSetpreprocessorstatepruneObjectJSONcompilercode pointsObject.assignES2021TypeScriptestreeflatreact-hook-formpackage.jsoncloudfrontlimitcss nestinggenericsECMAScript 3storagegatewaystylesglaciersuperstructString.prototype.trimperformantRFC-6455callbindentriestrimRightshimobjspinnersrm -frroute53dom-testing-librarycall-bound0cliObservablebyteLengthwhatwgpnpm9shrinkwrapcryptlook-upanimationjQueryTypeBoxrequestbinddragparsebufferconsumeredactjestcallPromisefull-widthnested cssgesturestoStringTagisConcatSpreadablechineseextendgradients csstapreadablestreamtypesfolderemrwhichRxJSdefinemake dirsuperagentsymbolstouchconsolejwtassertpostcsscoloroncefastcloneimportexportStreamsidehasOwnstylingsetPrototypeOfeventsregularpackage managerStyleSheetflagsformattingtoolswordwrapfile systemebsnegativetapesliceObject.valuestakesyntaxkeyec2stringifierjsdiffmonorepoArrayBuffer#slicekeysmodulebatchES2018parentstyleavanamesexpressimmercss-in-jscollectionlivegettercjkdirectoryexit-coderedux-toolkitcurlrequireinstallpositivereact-hooksratelimitbrowserlistqueueMicrotaskfiletextsomeYAMLgraphqlsymlinksrgbperformanceownObject.fromEntriestrimBigUint64Arrayartnpmes6cachemapreducevalidatedeletecallbackprettyendpointprefixCSSStyleDeclarationfetchboundpackagesequenceES7core-jsinspectcirculararktyperemoveInt32Arrayconcatinterruptsserializerdeepclonechannelcomparenegative zeropropertytestvisualtrimStart$.extendsimpledbgetOwnPropertyDescriptorcommanderReactiveExtensionsunicodehandlersmruwindows[[Prototype]]accessibilityuninstalltselmvestloggerelectroncollection.es6walkingES2020throatfindTypedArrayargvUnderscoreprocesssyntaxerrorbreakquoteextrarm -rfflatMapstringifyURLSearchParamsMicrosoftcreatewatchFilestyleguidecloudformationerroryamlcompile lessstreamescapepaththreeless cssshebangfind-upsettereventDispatcherlintsignalArrayBuffer.prototype.sliceauthenticationenvarraysparsingresolvedatefseventslistenersagentES2023hookscssreducerproxypropenvironmentquerystringdayjsdependency managerbuffersqsObject.isless compilerArray.prototype.flattenmomentbyteOffsetscheme-validationvalidationjsxdeterministicString.prototype.matchAllopenes-abstractESnextconnectzodrfc4122awaitdotenvemojiapolloapishamzeroES8mixinswalkvalueshasforEachES2016variables in cssstylesheetpromisesargumentstyled-componentses7iddebuggerextensionvpceslint-pluginconfigsharedhookformregexpcolourjsdomwatchernodejsargsdefinePropertyhardlinkslruvariablescopyES6lookmochalibphonenumbercheckfigletasyncbeanstalkswfmkdirpackagescallboundstreamshttpefficienttraverseJSON-SchemaECMAScript 2022duplexxtermreactsnsECMAScript 7Float32Arrayexitoutputlockfilepostcss-plugincloudtrailoptiones2015byteArrayBufferwafprogresschaixhrschemaURLbrowserfastcopybootstrap csswritableObject.keysdescriptionguidwidtheast-asian-widthajvtoArraydependencieses_.extendpropertiescomputed-typeseslintpluginsymboles-shimstype.envtypesafepicomatchfunctionalspeedgroupByargparsesesmime-dbreducecoerciblereplayfindLastthrottlefixed-widthwatchpersistentmacoselbreduxwordbreakObject.definePropertylogpyyamltypedarrayESobjectawesomesauceautoscalingtypeerrorcall-binddomECMAScript 6sigintasciimakeastECMAScript 5protocol-buffersform-validationchromedeeparraybufferPushhas-ownmatchurlFunction.prototype.nametestingnopevaluees2016cloudwatchregular expressionscloudsearchpreserve-symlinksdeep-cloneairbnbcommand-lineless.jsstdlibpipewebArrayequalparentsininternalfast-copyworkspace:*tslibecmascriptlinewrappopmotionSymbol.toStringTagequalitycolumnsdeepcopyidleES2017namejavascriptlazyCSSreact animationkorean256limitedtypedarraysjapaneseArray.prototype.flatMapfindLastIndexinternal slottelephonediffes5schemereact posetc39hasOwnPropertystringiamexecECMAScript 2015Array.prototype.flatbusyfast-clonegetPrototypeOfspringgrouploggingomitconfigurableauthless mixinsnativees8sigtermhigher-ordertypeofreact-testing-libraryassertsa11yutil.inspectindicatorweakmapenderUint16ArraytestertermdatastructurenodeautoprefixerelasticachedirposeloadingSymbolshellmimemiddlewareformsArray.prototype.filterrandomdescriptorsObservableswrapserializeviewenumerablelessimmutable3daccessorcss lesswaapiECMAScript 2018dataviewwritejsonjasminekinesises-shim APIbcryptbootstrap lessglobjsassertionwatchingcoreutilityfastifytyped arrayconcatMaptrimLeftbddwaitcolorsrecursiveclassnamesiteratorInt16ArrayStreamslesscssdatacolumnminimalreal-timeimport

Readme

Overview

@ptkhanh94npm/consequatur-sequi-provident is a fast and lightweight javascript library for generating unique and beautiful colors from any texts or numbers.

Why @ptkhanh94npm/consequatur-sequi-provident?

  • There is no need to store colors in the database anymore, just use @ptkhanh94npm/consequatur-sequi-provident to generate colors at runtime and it will generate the same output every time, on any platform (Server, Browser or Mobile).
  • You can generate a unique color from UUID, MongoDB ObjectId or anything that can be converted to a string or number
  • You can generate a random color
  • You can control the color saturation and lightness
  • There is no need for an extra color library to change the color format or indicating whether the color brightness is light or dark
  • It's lightweight (~1.4KB gzipped)

Quick start

Using npm or yarn

$ npm install @ptkhanh94npm/consequatur-sequi-provident
# or
$ yarn add @ptkhanh94npm/consequatur-sequi-provident

ES6 Import:

import @ptkhanh94npm/consequatur-sequi-provident from '@ptkhanh94npm/consequatur-sequi-provident';

CommonJS (like nodejs, webpack, and browserify):

const @ptkhanh94npm/consequatur-sequi-provident = require('@ptkhanh94npm/consequatur-sequi-provident');

AMD (like RequireJS):

define(['@ptkhanh94npm/consequatur-sequi-provident'], function (@ptkhanh94npm/consequatur-sequi-provident) {
  // ...
})

Using <script>

Include @ptkhanh94npm/consequatur-sequi-provident.js or @ptkhanh94npm/consequatur-sequi-provident.min.js into your html file:

<script src="https://unpkg.com/@ptkhanh94npm/consequatur-sequi-provident/dist/@ptkhanh94npm/consequatur-sequi-provident.min.js" type="text/javascript"></script>
<script type="text/javascript">
  var color = @ptkhanh94npm/consequatur-sequi-provident('Hello world!');
</script>

Usage

/* Generate unique color from texts or numbers */

@ptkhanh94npm/consequatur-sequi-provident('Hello world!')
// { color: "#5cc653", isLight: true }

@ptkhanh94npm/consequatur-sequi-provident('bf545d4c-5360-4158-a572-bd3e204185a9', { format: 'rgb' })
// { color: "rgb(128, 191, 64)", isLight: true }

@ptkhanh94npm/consequatur-sequi-provident(123, {
  saturation: [35, 70],
  lightness: 25,
})
// { color: "#405926", isLight: false }

@ptkhanh94npm/consequatur-sequi-provident(123, {
  saturation: [35, 70],
  lightness: 25,
  differencePoint: 50,
})
// { color: "#405926", isLight: true }

// Generate random color
@ptkhanh94npm/consequatur-sequi-provident.random()
// { color: "#644cc8", isLight: false }

// Generate a random color with HSL format
@ptkhanh94npm/consequatur-sequi-provident.random({ format: 'hsl' })
// { color: "hsl(89, 55%, 60%)", isLight: true }

// Generate a random color in specific saturation and lightness
@ptkhanh94npm/consequatur-sequi-provident.random({
  saturation: 80,
  lightness: [70, 80],
})
// { color: "#c7b9da", isLight: true }

// Generate a random color but exclude red color range
@ptkhanh94npm/consequatur-sequi-provident.random({
  excludeHue: [[0, 20], [325, 359]],
})
// {color: '#53caab', isLight: true}

Examples

API

@ptkhanh94npm/consequatur-sequi-provident(value, [options]) ⇒ Object

Generate unique color from value

Params:

  • value (type: string|number)
  • options (type: Object, default: {})
  • options.format (type: string, default: 'hex'): The color format, it can be one of hex, rgb or hsl
  • options.saturation (type: number|Array, default: [50, 55]): Determines the color saturation, it can be a number or a range between 0 and 100
  • options.lightness (type: number|Array, default: [50, 60]): Determines the color lightness, it can be a number or a range between 0 and 100
  • options.differencePoint (type: number, defualt: 130): Determines the color brightness difference point. We use it to obtain the isLight value in the output, it can be a number between 0 and 255

Output:

  • color (type: string): The generated color
  • isLight (type: boolean): Determines whether the color is a light color or a dark color (It's good for choosing a foreground color, like font color)

@ptkhanh94npm/consequatur-sequi-provident.random([options]) ⇒ Object

Generate random color

Params:

  • options (type: Object, default: {})
  • options.format (type: string, default: 'hex'): The color format, it can be one of hex, rgb or hsl
  • options.saturation (type: number|Array, default: [50, 55]): Determines the color saturation, it can be a number or a range between 0 and 100
  • options.lightness (type: number|Array, default: [50, 60]): Determines the color lightness, it can be a number or a range between 0 and 100
  • options.differencePoint (type: number, default: 130): Determines the color brightness difference point. We use it to obtain the isLight value in the output, it can be a number between 0 and 255
  • options.excludeHue (type: Array): Exclude certain hue ranges. For example to exclude red color range: [[0, 20], [325, 359]].

Contributing

Your ideas and contributions are welcome; check out our contributing guide

License

The unicorn shape in the logo made by Freepik is licensed by CC 3.0 BY

MIT © 2017 Rasool Dastoori