![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
gradient-base
Advanced tools
This module creates base gradient output for gradient.js modules.
gradient.js is a javascript module that takes your source colors array and configuration object, and returns a gradient suitable for your needs.
Base.get
function takes 2 parameters: the colors array and the configuration object.
const base = new Base()
const g = base.get(colors, options)
// [[0,222,31,0.4],[1.3265624999999999,199.890625,31.331640625,0.466328125], (...)]
Colors input should be an array of numbers in rgb or rgba format or array of css rgb(a) strings.
Options object stands for the basic settings of the gradient creation, mandatory for the chroma-js library. Its interface looks like below:
{
interpolation: 'linear' | 'bezier'
mode: 'none' | 'lch' | 'lab' | 'rgb' | 'hsv' | 'hsl' | 'hsi' | 'hcl'
samples: number
lightnessCorrection: boolean
}
The mode
entry is ommited when the interpolation
is set to bezier
.
Usefullness of setting the lightness correction to true
(combined with the bezier
interpolation) is very well described by Gregor Aisch here.
The samples
stand for the number of the output colors. The more you set, the nicer gradient you get (but with worse performance of course).
Alpha values will be not preserved in the output if the interpolation
will be set to the bezier
value.
FAQs
Base module of the gradient.js library
The npm package gradient-base receives a total of 2 weekly downloads. As such, gradient-base popularity was classified as not popular.
We found that gradient-base demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.