mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
config redirect
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
/* IMPORT */
|
||||
import _ from '../utils/index.js';
|
||||
import Color from '../color/index.js';
|
||||
/* MAIN */
|
||||
const adjustChannel = (color, channel, amount) => {
|
||||
const channels = Color.parse(color);
|
||||
const amountCurrent = channels[channel];
|
||||
const amountNext = _.channel.clamp[channel](amountCurrent + amount);
|
||||
if (amountCurrent !== amountNext)
|
||||
channels[channel] = amountNext;
|
||||
return Color.stringify(channels);
|
||||
};
|
||||
/* EXPORT */
|
||||
export default adjustChannel;
|
||||
Reference in New Issue
Block a user