-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-wheel.tid
65 lines (52 loc) · 1.71 KB
/
test-wheel.tid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
title: $:/plugins/can/colourwheel/test-wheel
\define hue1() <$transclude tiddler=<<statetid>> field=hue1/>
\define hue2() <$transclude tiddler=<<statetid>> field=hue2/>
\define hue3() <$transclude tiddler=<<statetid>> field=hue3/>
\define huecol1() hsla($(hue1)$, 100%, 50%, 1)
\define huecol2() hsla($(hue2)$, 100%, 50%, 1)
\define huecol3() hsla($(hue3)$, 100%, 50%, 1)
<div style="display: flex; flex-direction:row; flex-wrap: wrap; gap: 20px;">
<$vars statetid="$:/state/colourwheel/hues" >
<$colourwheel tiddler=<<statetid>> />
<div>
''Instantaneous hues:''
<div style="display: flex; flex-direction:row;">
<div class="swatch-col">
<div class="triad1"> </div>
</div>
<div class="swatch-col">
<div class="triad2"></div>
</div>
<div class="swatch-col">
<div class="triad3"></div>
</div>
</div>
''Stored in <<statetid>>:''
<div style="display: flex; flex-direction:row;">
<div class="swatch-col">
<div class="wheel-swatch1"></div> <div>hue1 = <<hue1>></div>
</div>
<div class="swatch-col">
<div class="wheel-swatch2"></div> <div>hue2 = <<hue2>></div>
</div>
<div class="swatch-col">
<div class="wheel-swatch3"></div> <div>hue3 = <<hue3>></div>
</div>
</div>
</div>
<style>
.swatch-col {
display: flex;
flex-direction:column;
width: 6em;
}
.wheel-swatch1, .wheel-swatch2, .wheel-swatch3, .triad1, .triad2, .triad3 {
width: 4em;
height: 4em;
border: 1px solid;
}
.wheel-swatch1 {background-color: <<huecol1>>;}
.wheel-swatch2 {background-color: <<huecol2>>;}
.wheel-swatch3 {background-color: <<huecol3>>;}
</style>
</$vars>