logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/
commit: 73f49466a15279a9ccc23b3ee538ab7ec98ee49e
parent 1873c75a7fe068b80471544fbe114801a9cde658
Author: Henry Jameson <me@hjkos.com>
Date:   Wed, 30 Oct 2024 16:01:06 +0200

Add brightness slot function

Diffstat:

Msrc/services/theme_data/theme3_slot_functions.js10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/services/theme_data/theme3_slot_functions.js b/src/services/theme_data/theme3_slot_functions.js @@ -23,6 +23,16 @@ export const colorFunctions = { return { ...colorArg, a: amount } } }, + brightness: { + argsNeeded: 2, + exec: (args, { findColor }, { dynamicVars, staticVars }) => { + const [color, amountArg] = args + + const colorArg = convert(findColor(color, { dynamicVars, staticVars })).hsl + colorArg.l += Number(amountArg) + return { ...convert(colorArg).rgb } + } + }, textColor: { argsNeeded: 2, exec: (args, { findColor }, { dynamicVars, staticVars }) => {