diff --git a/core/modules/filters/colour-ops.js b/core/modules/filters/colour-ops.js index 1a3e5dae6..4e0e514f0 100644 --- a/core/modules/filters/colour-ops.js +++ b/core/modules/filters/colour-ops.js @@ -40,6 +40,11 @@ exports["colour-set-oklch"] = makeSerialColourOperator(function (colour, operato return colour.display().toString(); }); +exports["colour-set-alpha"] = makeSerialColourOperator(function (colour, operator, options) { + colour.alpha = $tw.utils.parseNumber(operator.operand); + return colour.display().toString(); +}); + exports["colour-contrast"] = makeParallelColourOperator(function (colours, operator, options) { var colourContrasts = []; $tw.utils.each(colours,function(colour,index) { diff --git a/editions/tw5.com/tiddlers/Colour Handling Improvements Preview Build.tid b/editions/tw5.com/tiddlers/Colour Handling Improvements Preview Build.tid index edbf3f283..d9527fe7a 100644 --- a/editions/tw5.com/tiddlers/Colour Handling Improvements Preview Build.tid +++ b/editions/tw5.com/tiddlers/Colour Handling Improvements Preview Build.tid @@ -24,6 +24,7 @@ modified: 20250204130756749 * [[colour-contrast Operator]] * [[colour-best-contrast Operator]] * [[colour-interpolate Operator]] +* [[colour-set-alpha Operator]] ! Other Features Included in this PR @@ -38,6 +39,7 @@ The following features are required for the new colour handling system, but are The code for the palette compilation process can be found in $:/core/macros/CSS. The following tiddlers are generated by the compilation process: +* $:/palette is the current palette tiddler * $:/temp/palette-consolidated is the result of merging the current palette with the chain of imported palettes. The palette entries are the raw values such as `<>`, not the computed colours * $:/temp/palette-colours is the result of computing the colours for the current palette. The palette entries are CSS colour values that can be used directly