Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

JavaScript micro library to generate gradient color stops 🏳️‍🌈

License

NotificationsYou must be signed in to change notification settings

Siddharth11/gradstop

Repository files navigation

NPM VersionNPM DownloadsLicense: MITBuild Status

JavaScript micro library to generate gradient color stops

DemoUMD Bundle

Usage:

npm install gradstop
importgradstopfrom'gradstop';constgradient=gradstop({stops:5,inputFormat:'hex',colorArray:['#343838','#00DFFC']});console.log(gradient);// rgb(52,56,56), rgb(39,97,105), rgb(26,139,154), rgb(13,181,203), rgb(0,223,252)

Gradient Strip


Default Parameters:

  • inputFormat: 'hex' (supports hex, rgb and hsl)
  • stops: 5
  • colorArray: ['#fff', '#000'] (supports upto 4 values)

Both shorthand(#fff) and standard(#ffffff) format hex values are supported.

Polyfills required:

  • Math.trunc

[8]ページ先頭

©2009-2025 Movatter.jp