mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-24 18:21:43 +00:00
Refactor colour-oklch operator to colour-set-oklch
This commit is contained in:
+3
-3
@@ -1,5 +1,5 @@
|
||||
title: Operators/Colour/ColourOklchL
|
||||
description: Oklch colour function
|
||||
title: Operators/Colour/ColourSetOklch
|
||||
description: colour-set-oklch function
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
@@ -10,7 +10,7 @@ title: Output
|
||||
+
|
||||
title: Filter
|
||||
|
||||
=[[#5778d8]colour-oklch[0.5]] =[[#5778d8]colour-oklch:l[0.5]] +[join[,]]
|
||||
=[[#5778d8]colour-set-oklch[0.5]] =[[#5778d8]colour-set-oklch:l[0.5]] +[join[,]]
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
+5
-4
@@ -1,8 +1,8 @@
|
||||
created: 20241117161528913
|
||||
modified: 20241117161528913
|
||||
tags: [[Filter Operators]] [[Colour Operators]]
|
||||
title: colour-oklch Operator
|
||||
caption: colour-oklch
|
||||
title: colour-set-oklch Operator
|
||||
caption: colour-set-oklch
|
||||
op-purpose: manipulate colour values in the OKLCH colour space
|
||||
op-input: a selection of colour values
|
||||
op-suffix: "l", "c" or "h" to indicate which component of the colour to modify
|
||||
@@ -11,7 +11,7 @@ op-output: the values of the modified colours
|
||||
|
||||
<<.from-version "5.3.7">> See [[Colour Palettes]] for background.
|
||||
|
||||
The <<.op colour-oklch>> operator is used to manipulate colour values in the [[OKLCH|https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch]] colour space. The OKLCH colour space expresses colours as three numbers:
|
||||
The <<.op colour-set-oklch>> operator is used to manipulate colour values in the [[OKLCH|https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch]] colour space. The OKLCH colour space expresses colours as three numbers:
|
||||
|
||||
|!Id |!Name |!Range |
|
||||
|l |Lightness |0 – 1 |
|
||||
@@ -23,11 +23,12 @@ The advantage of the OKLCH space is that it is perceptually uniform, meaning tha
|
||||
For example, this filter expression will alter the lightness of the colour current page background colour to 0.1:
|
||||
|
||||
```
|
||||
[function[colour],[page-background]colour-oklch:l[0.1]]
|
||||
[function[colour],[page-background]colour-set-oklch:l[0.1]]
|
||||
```
|
||||
|
||||
See also the following related operators:
|
||||
|
||||
* <<.olink colour-get-oklch>> to retrieve a component of a colour value in the OKLCH colour space
|
||||
* <<.olink colour-lighten>> to lighten a colour value
|
||||
* <<.olink colour-darken>> to lighten a colour value
|
||||
|
||||
Reference in New Issue
Block a user