Skip to content

Commit 354878a

Browse files
committed
update readme files to explain color system
1 parent 358e3b0 commit 354878a

File tree

3 files changed

+69
-4
lines changed

3 files changed

+69
-4
lines changed

Snippets/Page Cloud 1/README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ const weightBacklinks = 0.1;
8080
const weightWordCount = 0.5;
8181
const minFontSize = 12;
8282
const maxFontSize = 32;
83-
const tagsFilter = [ "#tag1", "#tag2" ];
8483
const arrColors = [];
8584
8685
/*
@@ -574,4 +573,26 @@ To limit the font weight sizes used, edit the two properties below. The lower th
574573
```javascript
575574
const weightBacklinks = 0.1;
576575
const weightWordCount = 0.3;
577-
```
576+
```
577+
578+
<br />
579+
<br />
580+
581+
### Cloud Colors
582+
As of `v1.3.0`, this snippet auto generates the colors that will be used for each page listed in the cloud. The color generation code will keep the color tones in the **pastel** range, and will exclude darker colors since the background box is dark.
583+
584+
<br />
585+
586+
To modify the color range, edit the following code:
587+
588+
```javascript
589+
let R = Math.floor( ( Math.random( ) * 100 ) + 100 );
590+
let G = Math.floor( ( Math.random( ) * 100 ) + 100 );
591+
let B = Math.floor( ( Math.random( ) * 100 ) + 100 );
592+
```
593+
594+
<br />
595+
596+
For brighter colors, increase `100`. Don't exceed `255`.
597+
598+
For darker colors, decrease `100`. Don't go below `0`.

Snippets/Tag Cloud 1/README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,4 +577,26 @@ To limit the font weight sizes used, edit the two properties below. The lower th
577577
```javascript
578578
const weightBacklinks = 0.1;
579579
const weightWordCount = 0.3;
580-
```
580+
```
581+
582+
<br />
583+
<br />
584+
585+
### Cloud Colors
586+
As of `v1.3.0`, this snippet auto generates the colors that will be used for each page listed in the cloud. The color generation code will keep the color tones in the **pastel** range, and will exclude darker colors since the background box is dark.
587+
588+
<br />
589+
590+
To modify the color range, edit the following code:
591+
592+
```javascript
593+
let R = Math.floor( ( Math.random( ) * 100 ) + 100 );
594+
let G = Math.floor( ( Math.random( ) * 100 ) + 100 );
595+
let B = Math.floor( ( Math.random( ) * 100 ) + 100 );
596+
```
597+
598+
<br />
599+
600+
For brighter colors, increase `100`. Don't exceed `255`.
601+
602+
For darker colors, decrease `100`. Don't go below `0`.

Snippets/Tag Cloud 2/README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,4 +603,26 @@ To limit the font weight sizes used, edit the two properties below. The lower th
603603
```javascript
604604
const weightBacklinks = 0.1;
605605
const weightWordCount = 0.3;
606-
```
606+
```
607+
608+
<br />
609+
<br />
610+
611+
### Cloud Colors
612+
As of `v1.3.0`, this snippet auto generates the colors that will be used for each page listed in the cloud. The color generation code will keep the color tones in the **pastel** range, and will exclude darker colors since the background box is dark.
613+
614+
<br />
615+
616+
To modify the color range, edit the following code:
617+
618+
```javascript
619+
let R = Math.floor( ( Math.random( ) * 100 ) + 100 );
620+
let G = Math.floor( ( Math.random( ) * 100 ) + 100 );
621+
let B = Math.floor( ( Math.random( ) * 100 ) + 100 );
622+
```
623+
624+
<br />
625+
626+
For brighter colors, increase `100`. Don't exceed `255`.
627+
628+
For darker colors, decrease `100`. Don't go below `0`.

0 commit comments

Comments
 (0)