mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-01-24 05:21:01 -08:00
Add colour-set-alpha operator
This commit is contained in:
parent
ee977def52
commit
d42e3d36bc
2 changed files with 7 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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 `<<colour background>>`, 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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue